Lines Matching refs:assoc_req
114 struct assoc_request *assoc_req) in lbs_associate() argument
123 0, assoc_req->bss.bssid); in lbs_associate()
129 (assoc_req->bss.capability & WLAN_CAPABILITY_SHORT_PREAMBLE)) in lbs_associate()
137 0, CMD_OPTION_WAITFORRSP, 0, assoc_req); in lbs_associate()
153 struct assoc_request *assoc_req) in lbs_adhoc_join() argument
156 struct bss_descriptor *bss = &assoc_req->bss; in lbs_adhoc_join()
206 lbs_deb_join("AdhocJoin: channel = %d\n", assoc_req->channel); in lbs_adhoc_join()
207 lbs_deb_join("AdhocJoin: band = %c\n", assoc_req->band); in lbs_adhoc_join()
265 if (assoc_req->secinfo.wep_enabled) { in lbs_adhoc_join()
307 struct assoc_request *assoc_req) in lbs_adhoc_start() argument
331 memcpy(cmd.ssid, assoc_req->ssid, assoc_req->ssid_len); in lbs_adhoc_start()
334 print_ssid(ssid, assoc_req->ssid, assoc_req->ssid_len), in lbs_adhoc_start()
335 assoc_req->ssid_len); in lbs_adhoc_start()
343 WARN_ON(!assoc_req->channel); in lbs_adhoc_start()
348 cmd.phyparamset.dsparamset.currentchan = assoc_req->channel; in lbs_adhoc_start()
357 if (assoc_req->secinfo.wep_enabled) { in lbs_adhoc_start()
391 assoc_req->channel, assoc_req->band); in lbs_adhoc_start()
697 struct assoc_request * assoc_req) in assoc_helper_essid() argument
710 if (test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags)) in assoc_helper_essid()
711 channel = assoc_req->channel; in assoc_helper_essid()
714 print_ssid(ssid, assoc_req->ssid, assoc_req->ssid_len)); in assoc_helper_essid()
715 if (assoc_req->mode == IW_MODE_INFRA) { in assoc_helper_essid()
716 lbs_send_specific_ssid_scan(priv, assoc_req->ssid, in assoc_helper_essid()
717 assoc_req->ssid_len); in assoc_helper_essid()
719 bss = lbs_find_ssid_in_list(priv, assoc_req->ssid, in assoc_helper_essid()
720 assoc_req->ssid_len, NULL, IW_MODE_INFRA, channel); in assoc_helper_essid()
722 memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor)); in assoc_helper_essid()
723 ret = lbs_associate(priv, assoc_req); in assoc_helper_essid()
727 } else if (assoc_req->mode == IW_MODE_ADHOC) { in assoc_helper_essid()
731 lbs_send_specific_ssid_scan(priv, assoc_req->ssid, in assoc_helper_essid()
732 assoc_req->ssid_len); in assoc_helper_essid()
735 bss = lbs_find_ssid_in_list(priv, assoc_req->ssid, in assoc_helper_essid()
736 assoc_req->ssid_len, NULL, IW_MODE_ADHOC, channel); in assoc_helper_essid()
739 memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor)); in assoc_helper_essid()
740 lbs_adhoc_join(priv, assoc_req); in assoc_helper_essid()
744 memcpy(&assoc_req->bss.ssid, &assoc_req->ssid, in assoc_helper_essid()
746 assoc_req->bss.ssid_len = assoc_req->ssid_len; in assoc_helper_essid()
747 lbs_adhoc_start(priv, assoc_req); in assoc_helper_essid()
757 struct assoc_request * assoc_req) in assoc_helper_bssid() argument
762 lbs_deb_enter_args(LBS_DEB_ASSOC, "BSSID %pM", assoc_req->bssid); in assoc_helper_bssid()
765 bss = lbs_find_bssid_in_list(priv, assoc_req->bssid, in assoc_helper_bssid()
766 assoc_req->mode); in assoc_helper_bssid()
769 "cannot associate.\n", assoc_req->bssid); in assoc_helper_bssid()
773 memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor)); in assoc_helper_bssid()
774 if (assoc_req->mode == IW_MODE_INFRA) { in assoc_helper_bssid()
775 ret = lbs_associate(priv, assoc_req); in assoc_helper_bssid()
777 } else if (assoc_req->mode == IW_MODE_ADHOC) { in assoc_helper_bssid()
778 lbs_adhoc_join(priv, assoc_req); in assoc_helper_bssid()
788 struct assoc_request * assoc_req) in assoc_helper_associate() argument
796 if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { in assoc_helper_associate()
797 if (compare_ether_addr(bssid_any, assoc_req->bssid) in assoc_helper_associate()
798 && compare_ether_addr(bssid_off, assoc_req->bssid)) { in assoc_helper_associate()
799 ret = assoc_helper_bssid(priv, assoc_req); in assoc_helper_associate()
804 if (!done && test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) { in assoc_helper_associate()
805 ret = assoc_helper_essid(priv, assoc_req); in assoc_helper_associate()
814 struct assoc_request * assoc_req) in assoc_helper_mode() argument
820 if (assoc_req->mode == priv->mode) in assoc_helper_mode()
823 if (assoc_req->mode == IW_MODE_INFRA) { in assoc_helper_mode()
829 priv->mode = assoc_req->mode; in assoc_helper_mode()
830 ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_BSS_TYPE, assoc_req->mode); in assoc_helper_mode()
838 struct assoc_request * assoc_req) in assoc_helper_channel() argument
850 if (assoc_req->channel == priv->curbssparams.channel) in assoc_helper_channel()
858 assoc_req->channel); in assoc_helper_channel()
862 priv->curbssparams.channel, assoc_req->channel); in assoc_helper_channel()
864 ret = lbs_set_channel(priv, assoc_req->channel); in assoc_helper_channel()
877 if (assoc_req->channel != priv->curbssparams.channel) { in assoc_helper_channel()
879 assoc_req->channel); in assoc_helper_channel()
883 if ( assoc_req->secinfo.wep_enabled in assoc_helper_channel()
884 && (assoc_req->wep_keys[0].len in assoc_helper_channel()
885 || assoc_req->wep_keys[1].len in assoc_helper_channel()
886 || assoc_req->wep_keys[2].len in assoc_helper_channel()
887 || assoc_req->wep_keys[3].len)) { in assoc_helper_channel()
889 set_bit(ASSOC_FLAG_WEP_KEYS, &assoc_req->flags); in assoc_helper_channel()
893 set_bit(ASSOC_FLAG_SSID, &assoc_req->flags); in assoc_helper_channel()
907 struct assoc_request *assoc_req) in assoc_helper_wep_keys() argument
915 if (assoc_req->wep_keys[0].len || assoc_req->wep_keys[1].len || in assoc_helper_wep_keys()
916 assoc_req->wep_keys[2].len || assoc_req->wep_keys[3].len) in assoc_helper_wep_keys()
917 ret = lbs_cmd_802_11_set_wep(priv, CMD_ACT_ADD, assoc_req); in assoc_helper_wep_keys()
919 ret = lbs_cmd_802_11_set_wep(priv, CMD_ACT_REMOVE, assoc_req); in assoc_helper_wep_keys()
925 if (assoc_req->secinfo.wep_enabled) in assoc_helper_wep_keys()
936 memcpy(&priv->wep_keys[i], &assoc_req->wep_keys[i], in assoc_helper_wep_keys()
939 priv->wep_tx_keyidx = assoc_req->wep_tx_keyidx; in assoc_helper_wep_keys()
949 struct assoc_request * assoc_req) in assoc_helper_secinfo() argument
957 memcpy(&priv->secinfo, &assoc_req->secinfo, in assoc_helper_secinfo()
975 do_wpa = assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled; in assoc_helper_secinfo()
989 struct assoc_request * assoc_req) in assoc_helper_wpa_keys() argument
992 unsigned int flags = assoc_req->flags; in assoc_helper_wpa_keys()
1001 if (test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) { in assoc_helper_wpa_keys()
1002 clear_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags); in assoc_helper_wpa_keys()
1003 ret = lbs_cmd_802_11_key_material(priv, CMD_ACT_SET, assoc_req); in assoc_helper_wpa_keys()
1004 assoc_req->flags = flags; in assoc_helper_wpa_keys()
1010 if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags)) { in assoc_helper_wpa_keys()
1011 clear_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags); in assoc_helper_wpa_keys()
1013 ret = lbs_cmd_802_11_key_material(priv, CMD_ACT_SET, assoc_req); in assoc_helper_wpa_keys()
1014 assoc_req->flags = flags; in assoc_helper_wpa_keys()
1024 struct assoc_request * assoc_req) in assoc_helper_wpa_ie() argument
1030 if (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled) { in assoc_helper_wpa_ie()
1031 memcpy(&priv->wpa_ie, &assoc_req->wpa_ie, assoc_req->wpa_ie_len); in assoc_helper_wpa_ie()
1032 priv->wpa_ie_len = assoc_req->wpa_ie_len; in assoc_helper_wpa_ie()
1044 struct assoc_request * assoc_req) in should_deauth_infrastructure() argument
1052 if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) { in should_deauth_infrastructure()
1058 if (test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) { in should_deauth_infrastructure()
1059 if (priv->secinfo.auth_mode != assoc_req->secinfo.auth_mode) { in should_deauth_infrastructure()
1066 if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { in should_deauth_infrastructure()
1072 if (test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags)) { in should_deauth_infrastructure()
1079 if (test_bit(ASSOC_FLAG_MODE, &assoc_req->flags)) { in should_deauth_infrastructure()
1080 if (assoc_req->mode != IW_MODE_INFRA) { in should_deauth_infrastructure()
1095 struct assoc_request * assoc_req) in should_stop_adhoc() argument
1104 assoc_req->ssid, assoc_req->ssid_len) != 0) in should_stop_adhoc()
1108 if (test_bit(ASSOC_FLAG_MODE, &assoc_req->flags)) { in should_stop_adhoc()
1109 if (assoc_req->mode != IW_MODE_ADHOC) in should_stop_adhoc()
1113 if (test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags)) { in should_stop_adhoc()
1114 if (assoc_req->channel != priv->curbssparams.channel) in should_stop_adhoc()
1212 struct assoc_request * assoc_req = NULL; in lbs_association_worker() local
1220 assoc_req = priv->pending_assoc_req; in lbs_association_worker()
1222 priv->in_progress_assoc_req = assoc_req; in lbs_association_worker()
1225 if (!assoc_req) in lbs_association_worker()
1238 assoc_req->flags, in lbs_association_worker()
1239 print_ssid(ssid, assoc_req->ssid, assoc_req->ssid_len), in lbs_association_worker()
1240 assoc_req->channel, assoc_req->band, assoc_req->mode, in lbs_association_worker()
1241 assoc_req->bssid, in lbs_association_worker()
1242 assoc_req->secinfo.WPAenabled ? " WPA" : "", in lbs_association_worker()
1243 assoc_req->secinfo.WPA2enabled ? " WPA2" : "", in lbs_association_worker()
1244 assoc_req->secinfo.wep_enabled ? " WEP" : "", in lbs_association_worker()
1245 assoc_req->secinfo.auth_mode); in lbs_association_worker()
1248 if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags) in lbs_association_worker()
1249 && !assoc_req->ssid_len) in lbs_association_worker()
1253 if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { in lbs_association_worker()
1254 if (compare_ether_addr(assoc_req->bssid, bssid_any) in lbs_association_worker()
1255 && compare_ether_addr(assoc_req->bssid, bssid_off)) in lbs_association_worker()
1260 u8 new_mode = assoc_req->mode; in lbs_association_worker()
1262 ret = lbs_find_best_network_ssid(priv, assoc_req->ssid, in lbs_association_worker()
1263 &assoc_req->ssid_len, assoc_req->mode, &new_mode); in lbs_association_worker()
1271 if (assoc_req->mode == IW_MODE_AUTO) { in lbs_association_worker()
1272 set_bit(ASSOC_FLAG_MODE, &assoc_req->flags); in lbs_association_worker()
1273 assoc_req->mode = new_mode; in lbs_association_worker()
1282 if (should_deauth_infrastructure(priv, assoc_req)) { in lbs_association_worker()
1293 if (should_stop_adhoc(priv, assoc_req)) { in lbs_association_worker()
1305 if (test_bit(ASSOC_FLAG_MODE, &assoc_req->flags)) { in lbs_association_worker()
1306 ret = assoc_helper_mode(priv, assoc_req); in lbs_association_worker()
1311 if (test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags)) { in lbs_association_worker()
1312 ret = assoc_helper_channel(priv, assoc_req); in lbs_association_worker()
1317 if ( test_bit(ASSOC_FLAG_WEP_KEYS, &assoc_req->flags) in lbs_association_worker()
1318 || test_bit(ASSOC_FLAG_WEP_TX_KEYIDX, &assoc_req->flags)) { in lbs_association_worker()
1319 ret = assoc_helper_wep_keys(priv, assoc_req); in lbs_association_worker()
1324 if (test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) { in lbs_association_worker()
1325 ret = assoc_helper_secinfo(priv, assoc_req); in lbs_association_worker()
1330 if (test_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags)) { in lbs_association_worker()
1331 ret = assoc_helper_wpa_ie(priv, assoc_req); in lbs_association_worker()
1336 if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags) in lbs_association_worker()
1337 || test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) { in lbs_association_worker()
1338 ret = assoc_helper_wpa_keys(priv, assoc_req); in lbs_association_worker()
1346 if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags) in lbs_association_worker()
1347 || test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) { in lbs_association_worker()
1350 ret = assoc_helper_associate(priv, assoc_req); in lbs_association_worker()
1383 kfree(assoc_req); in lbs_association_worker()
1395 struct assoc_request * assoc_req; in lbs_get_association_request() local
1411 assoc_req = priv->pending_assoc_req; in lbs_get_association_request()
1412 if (!test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) { in lbs_get_association_request()
1413 memcpy(&assoc_req->ssid, &priv->curbssparams.ssid, in lbs_get_association_request()
1415 assoc_req->ssid_len = priv->curbssparams.ssid_len; in lbs_get_association_request()
1418 if (!test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags)) in lbs_get_association_request()
1419 assoc_req->channel = priv->curbssparams.channel; in lbs_get_association_request()
1421 if (!test_bit(ASSOC_FLAG_BAND, &assoc_req->flags)) in lbs_get_association_request()
1422 assoc_req->band = priv->curbssparams.band; in lbs_get_association_request()
1424 if (!test_bit(ASSOC_FLAG_MODE, &assoc_req->flags)) in lbs_get_association_request()
1425 assoc_req->mode = priv->mode; in lbs_get_association_request()
1427 if (!test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { in lbs_get_association_request()
1428 memcpy(&assoc_req->bssid, priv->curbssparams.bssid, in lbs_get_association_request()
1432 if (!test_bit(ASSOC_FLAG_WEP_KEYS, &assoc_req->flags)) { in lbs_get_association_request()
1435 memcpy(&assoc_req->wep_keys[i], &priv->wep_keys[i], in lbs_get_association_request()
1440 if (!test_bit(ASSOC_FLAG_WEP_TX_KEYIDX, &assoc_req->flags)) in lbs_get_association_request()
1441 assoc_req->wep_tx_keyidx = priv->wep_tx_keyidx; in lbs_get_association_request()
1443 if (!test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags)) { in lbs_get_association_request()
1444 memcpy(&assoc_req->wpa_mcast_key, &priv->wpa_mcast_key, in lbs_get_association_request()
1448 if (!test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) { in lbs_get_association_request()
1449 memcpy(&assoc_req->wpa_unicast_key, &priv->wpa_unicast_key, in lbs_get_association_request()
1453 if (!test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) { in lbs_get_association_request()
1454 memcpy(&assoc_req->secinfo, &priv->secinfo, in lbs_get_association_request()
1458 if (!test_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags)) { in lbs_get_association_request()
1459 memcpy(&assoc_req->wpa_ie, &priv->wpa_ie, in lbs_get_association_request()
1461 assoc_req->wpa_ie_len = priv->wpa_ie_len; in lbs_get_association_request()
1465 return assoc_req; in lbs_get_association_request()
1558 struct assoc_request *assoc_req = pdata_buf; in lbs_cmd_80211_associate() local
1559 struct bss_descriptor *bss = &assoc_req->bss; in lbs_cmd_80211_associate()
1633 if (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled) { in lbs_cmd_80211_associate()
1636 rsn->header.type = cpu_to_le16((u16) assoc_req->wpa_ie[0]); in lbs_cmd_80211_associate()
1637 tmplen = (u16) assoc_req->wpa_ie[1]; in lbs_cmd_80211_associate()
1639 memcpy(rsn->rsnie, &assoc_req->wpa_ie[2], tmplen); in lbs_cmd_80211_associate()