29 static int disconnect_on_suspend = 1;
59 bool cancel_flag =
false;
114 "info: Enabling All Multicast!\n");
122 "info: Set multicast list=%d\n",
142 "info: old_pkt_filter=%#x, curr_pkt_filter=%#x\n",
182 dev_dbg(priv->
adapter->dev,
"info: InterpretIE: AP WEP enabled\n");
201 u8 *country_ie, country_ie_len;
210 country_ie_len = country_ie[1];
229 "11D: setting domain info in FW\n");
251 mwifiex_process_country_ie(priv, bss);
276 dev_dbg(adapter->
dev,
"info: SSID found in scan list ... "
279 if (!netif_queue_stopped(priv->
netdev))
281 if (netif_carrier_ok(priv->
netdev))
294 priv->
sec_info.authentication_mode =
304 if (bss_desc && bss_desc->
ssid.ssid_len &&
312 dev_dbg(adapter->
dev,
"info: Sending Adhoc Stop\n");
321 if (!netif_queue_stopped(priv->
netdev))
323 if (netif_carrier_ok(priv->
netdev))
327 dev_dbg(adapter->
dev,
"info: network found in scan"
328 " list. Joining...\n");
333 dev_dbg(adapter->
dev,
"info: Network not found in "
334 "the list, creating adhoc with ssid = %s\n",
365 dev_dbg(adapter->
dev,
"info: Host Sleep IOCTL"
366 " is blocked in UAPSD/PPS mode\n");
378 adapter->
hs_cfg.conditions =
381 adapter->
hs_cfg.conditions =
386 }
else if (adapter->
hs_cfg.conditions
405 adapter->
hs_cfg.conditions =
408 adapter->
hs_cfg.conditions =
457 if (disconnect_on_suspend) {
458 for (i = 0; i < adapter->
priv_num; i++) {
459 priv = adapter->
priv[
i];
466 dev_dbg(adapter->
dev,
"cmd: HS Already actived\n");
475 if (mwifiex_set_hs_params(mwifiex_get_priv(adapter,
479 dev_err(adapter->
dev,
"IOCTL request HS enable failed\n");
600 if ((dbm < priv->min_tx_power_level) ||
603 " is out of range (%d dBm-%d dBm)\n",
706 if (ie_len >
sizeof(priv->
wpa_ie)) {
708 "failed to copy WPA IE, too big\n");
722 priv->
sec_info.wpa2_enabled =
false;
730 priv->
sec_info.wpa2_enabled =
false;
744 u8 *ie_data_ptr,
u16 ie_len)
747 if (ie_len >
sizeof(priv->
wapi_ie)) {
749 "info: failed to copy WAPI IE, too big\n");
763 "info: Reset wapi_ie_len=%d IE=%#x\n",
765 priv->
sec_info.wapi_enabled =
false;
778 u8 *ie_data_ptr,
u16 ie_len)
784 if (ie_len >
sizeof(priv->
wps_ie)) {
786 "info: failed to copy WPS IE, too big\n");
798 "info: Reset wps_ie_len=%d\n", priv->
wps_ie_len);
809 static int mwifiex_sec_ioctl_set_wapi_key(
struct mwifiex_private *priv,
837 }
else if (!encrypt_key->
key_len) {
842 "key not set, so cannot enable it\n");
892 u8 remove_key =
false;
961 status = mwifiex_sec_ioctl_set_wapi_key(priv, encrypt_key);
963 status = mwifiex_sec_ioctl_set_wpa_key(priv, encrypt_key);
965 status = mwifiex_sec_ioctl_set_wep_key(priv, encrypt_key);
987 dev_dbg(adapter->
dev,
"info: MWIFIEX VERSION: %s\n", version);
1024 return mwifiex_sec_ioctl_encrypt_key(priv, &encrypt_key);
1055 memset(&roc_cfg, 0,
sizeof(roc_cfg));
1067 action, 0, &roc_cfg)) {
1080 "info: already in the desired role.\n");
1170 u32 reg_offset,
u32 reg_value)
1242 const u8 wpa_oui[] = { 0x00, 0x50, 0xf2, 0x01 };
1243 const u8 wps_oui[] = { 0x00, 0x50, 0xf2, 0x04 };
1248 priv->
wps.session_enable =
false;
1251 }
else if (!ie_data_ptr) {
1257 (!
memcmp(pvendor_ie->
oui, wpa_oui,
sizeof(wpa_oui)))) ||
1261 ret = mwifiex_set_wpa_ie_helper(priv, ie_data_ptr, ie_len);
1262 priv->
wps.session_enable =
false;
1267 ret = mwifiex_set_wapi_ie(priv, ie_data_ptr, ie_len);
1282 (!
memcmp(pvendor_ie->
oui, wps_oui,
sizeof(wps_oui)))) {
1283 priv->
wps.session_enable =
true;
1285 "info: WPS Session Enabled.\n");
1286 ret = mwifiex_set_wps_ie(priv, ie_data_ptr, ie_len);
1318 switch (gen_ie->
type) {
1324 mwifiex_set_gen_ie_helper(priv, gen_ie->
ie_data,
1332 dev_err(adapter->
dev,
"invalid ARP filter size\n");
1362 gen_ie.
len = ie_len;