2447, 2452, 2457, 2462, 2467, 2472, 2484
};
+const int frequency_list_a[] = { 5170, 5180, 5190, 5200, 5210, 5220, 5230,
+ 5240, 5260, 5280, 5300, 5320
+};
+
int
channel_of_freq(int f)
{
while ((c < 14) && (f != frequency_list_bg[c]))
c++;
return (c >= 14) ? 0 : ++c;
- } else if ((f >= (int) 5000) && (f <= (int) 6000)) {
- return ( (f - 5000) / 5 );
+ } else if ((f >= (int) 5170) && (f <= (int) 5320)) {
+ while ((c < 12) && (f != frequency_list_a[c]))
+ c++;
+ return (c >= 12) ? 0 : (c + 37);
} else
return 0;
}
/* 802.11 */
OID_U32_C(DOT11_OID_BSSTYPE, 0x10000000),
- OID_STRUCT_C(DOT11_OID_BSSID, 0x10000001, u8[6], OID_TYPE_RAW),
+ OID_STRUCT_C(DOT11_OID_BSSID, 0x10000001, u8[6], OID_TYPE_SSID),
OID_STRUCT_C(DOT11_OID_SSID, 0x10000002, struct obj_ssid,
OID_TYPE_SSID),
OID_U32(DOT11_OID_STATE, 0x10000003),
OID_UNKNOWN(OID_INL_MEMORY, 0xFF020002),
OID_U32_C(OID_INL_MODE, 0xFF020003),
OID_UNKNOWN(OID_INL_COMPONENT_NR, 0xFF020004),
- OID_STRUCT(OID_INL_VERSION, 0xFF020005, u8[8], OID_TYPE_RAW),
+ OID_UNKNOWN(OID_INL_VERSION, 0xFF020005),
OID_UNKNOWN(OID_INL_INTERFACE_ID, 0xFF020006),
OID_UNKNOWN(OID_INL_COMPONENT_ID, 0xFF020007),
OID_U32_C(OID_INL_CONFIG, 0xFF020008),
mgt_set_request(islpci_private *priv, enum oid_num_t n, int extra, void *data)
{
int ret = 0;
- struct islpci_mgmtframe *response = NULL;
+ struct islpci_mgmtframe *response;
int response_op = PIMFOR_OP_ERROR;
int dlen;
void *cache, *_data = data;
BUG_ON(OID_NUM_LAST <= n);
BUG_ON(extra > isl_oid[n].range);
- res->ptr = NULL;
-
if (!priv->mib)
/* memory has been freed */
return -1;
DOT11_OID_DEFKEYID,
DOT11_OID_DOT1XENABLE,
OID_INL_DOT11D_CONFORMANCE,
- /* Do not initialize this - fw < 1.0.4.3 rejects it
OID_INL_OUTPUTPOWER,
- */
};
/* update the MAC addr. */
static int
mgt_update_addr(islpci_private *priv)
{
- struct islpci_mgmtframe *res = NULL;
+ struct islpci_mgmtframe *res;
int ret;
ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET,
/* This will tell you if you are allowed to answer a mlme(ex) request .*/
-int
+inline int
mgt_mlme_answer(islpci_private *priv)
{
u32 mlmeautolevel;
(mlmeautolevel >= DOT11_MLME_INTERMEDIATE));
}
-enum oid_num_t
+inline enum oid_num_t
mgt_oidtonum(u32 oid)
{
int i;
case OID_TYPE_SSID:{
struct obj_ssid *ssid = r->ptr;
return snprintf(str, PRIV_STR_SIZE,
- "length=%u\noctets=%.*s\n",
- ssid->length, ssid->length,
- ssid->octets);
+ "length=%u\noctets=%s\n",
+ ssid->length, ssid->octets);
}
break;
case OID_TYPE_KEY:{