Lines Matching refs:ifibss
47 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_ibss_build_presp() local
71 ifibss->ie_len; in ieee80211_ibss_build_presp()
83 memcpy(mgmt->bssid, ifibss->bssid, ETH_ALEN); in ieee80211_ibss_build_presp()
91 *pos++ = ifibss->ssid_len; in ieee80211_ibss_build_presp()
92 memcpy(pos, ifibss->ssid, ifibss->ssid_len); in ieee80211_ibss_build_presp()
93 pos += ifibss->ssid_len; in ieee80211_ibss_build_presp()
172 if (ifibss->ie_len) { in ieee80211_ibss_build_presp()
173 memcpy(pos, ifibss->ie, ifibss->ie_len); in ieee80211_ibss_build_presp()
174 pos += ifibss->ie_len; in ieee80211_ibss_build_presp()
227 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in __ieee80211_sta_join_ibss() local
245 if (!ether_addr_equal(ifibss->bssid, bssid)) in __ieee80211_sta_join_ibss()
260 presp = rcu_dereference_protected(ifibss->presp, in __ieee80211_sta_join_ibss()
262 RCU_INIT_POINTER(ifibss->presp, NULL); in __ieee80211_sta_join_ibss()
297 if (err > 0 && !ifibss->userspace_handles_dfs) { in __ieee80211_sta_join_ibss()
307 ifibss->fixed_channel ? in __ieee80211_sta_join_ibss()
317 memcpy(ifibss->bssid, bssid, ETH_ALEN); in __ieee80211_sta_join_ibss()
325 rcu_assign_pointer(ifibss->presp, presp); in __ieee80211_sta_join_ibss()
331 sdata->vif.bss_conf.ssid_len = ifibss->ssid_len; in __ieee80211_sta_join_ibss()
332 memcpy(sdata->vif.bss_conf.ssid, ifibss->ssid, ifibss->ssid_len); in __ieee80211_sta_join_ibss()
373 RCU_INIT_POINTER(ifibss->presp, NULL); in __ieee80211_sta_join_ibss()
385 ifibss->state = IEEE80211_IBSS_MLME_JOINED; in __ieee80211_sta_join_ibss()
386 mod_timer(&ifibss->timer, in __ieee80211_sta_join_ibss()
396 cfg80211_ibss_joined(sdata->dev, ifibss->bssid, chan, GFP_KERNEL); in __ieee80211_sta_join_ibss()
488 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_ibss_csa_beacon() local
498 if (ifibss->privacy) in ieee80211_ibss_csa_beacon()
501 cbss = cfg80211_get_bss(sdata->local->hw.wiphy, ifibss->chandef.chan, in ieee80211_ibss_csa_beacon()
502 ifibss->bssid, ifibss->ssid, in ieee80211_ibss_csa_beacon()
503 ifibss->ssid_len, IEEE80211_BSS_TYPE_IBSS, in ieee80211_ibss_csa_beacon()
504 IEEE80211_PRIVACY(ifibss->privacy)); in ieee80211_ibss_csa_beacon()
517 old_presp = rcu_dereference_protected(ifibss->presp, in ieee80211_ibss_csa_beacon()
523 capability, tsf, &ifibss->chandef, in ieee80211_ibss_csa_beacon()
530 rcu_assign_pointer(ifibss->presp, presp); in ieee80211_ibss_csa_beacon()
541 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_ibss_finish_csa() local
548 if (!is_zero_ether_addr(ifibss->bssid)) { in ieee80211_ibss_finish_csa()
550 ifibss->chandef.chan, in ieee80211_ibss_finish_csa()
551 ifibss->bssid, ifibss->ssid, in ieee80211_ibss_finish_csa()
552 ifibss->ssid_len, in ieee80211_ibss_finish_csa()
554 IEEE80211_PRIVACY(ifibss->privacy)); in ieee80211_ibss_finish_csa()
562 ifibss->chandef = sdata->csa_chandef; in ieee80211_ibss_finish_csa()
576 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_ibss_stop() local
578 cancel_work_sync(&ifibss->csa_connection_drop_work); in ieee80211_ibss_stop()
611 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_ibss_add_sta() local
630 if (ifibss->state == IEEE80211_IBSS_MLME_SEARCH) { in ieee80211_ibss_add_sta()
690 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_ibss_disconnect() local
696 if (!is_zero_ether_addr(ifibss->bssid)) { in ieee80211_ibss_disconnect()
697 cbss = cfg80211_get_bss(local->hw.wiphy, ifibss->chandef.chan, in ieee80211_ibss_disconnect()
698 ifibss->bssid, ifibss->ssid, in ieee80211_ibss_disconnect()
699 ifibss->ssid_len, in ieee80211_ibss_disconnect()
701 IEEE80211_PRIVACY(ifibss->privacy)); in ieee80211_ibss_disconnect()
709 ifibss->state = IEEE80211_IBSS_MLME_SEARCH; in ieee80211_ibss_disconnect()
713 spin_lock_bh(&ifibss->incomplete_lock); in ieee80211_ibss_disconnect()
714 while (!list_empty(&ifibss->incomplete_stations)) { in ieee80211_ibss_disconnect()
715 sta = list_first_entry(&ifibss->incomplete_stations, in ieee80211_ibss_disconnect()
718 spin_unlock_bh(&ifibss->incomplete_lock); in ieee80211_ibss_disconnect()
721 spin_lock_bh(&ifibss->incomplete_lock); in ieee80211_ibss_disconnect()
723 spin_unlock_bh(&ifibss->incomplete_lock); in ieee80211_ibss_disconnect()
733 presp = rcu_dereference_protected(ifibss->presp, in ieee80211_ibss_disconnect()
768 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_ibss_csa_mark_radar() local
775 &ifibss->chandef, in ieee80211_ibss_csa_mark_radar()
778 cfg80211_radar_event(sdata->local->hw.wiphy, &ifibss->chandef, in ieee80211_ibss_csa_mark_radar()
789 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_ibss_process_chanswitch() local
797 switch (ifibss->chandef.width) { in ieee80211_ibss_process_chanswitch()
813 ifibss->chandef.chan->band, in ieee80211_ibss_process_chanswitch()
814 sta_flags, ifibss->bssid, &csa_ie); in ieee80211_ibss_process_chanswitch()
830 switch (ifibss->chandef.width) { in ieee80211_ibss_process_chanswitch()
839 ch_type = cfg80211_get_chandef_type(&ifibss->chandef); in ieee80211_ibss_process_chanswitch()
845 if (params.chandef.width != ifibss->chandef.width) { in ieee80211_ibss_process_chanswitch()
848 ifibss->bssid, in ieee80211_ibss_process_chanswitch()
866 ifibss->bssid, in ieee80211_ibss_process_chanswitch()
879 if (err > 0 && !ifibss->userspace_handles_dfs) { in ieee80211_ibss_process_chanswitch()
910 &ifibss->csa_connection_drop_work); in ieee80211_ibss_process_chanswitch()
1206 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_ibss_rx_no_sta() local
1224 if (ifibss->state == IEEE80211_IBSS_MLME_SEARCH) in ieee80211_ibss_rx_no_sta()
1249 spin_lock(&ifibss->incomplete_lock); in ieee80211_ibss_rx_no_sta()
1250 list_add(&sta->list, &ifibss->incomplete_stations); in ieee80211_ibss_rx_no_sta()
1251 spin_unlock(&ifibss->incomplete_lock); in ieee80211_ibss_rx_no_sta()
1290 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_sta_merge_ibss() local
1295 mod_timer(&ifibss->timer, in ieee80211_sta_merge_ibss()
1300 if (time_before(jiffies, ifibss->last_scan_completed + in ieee80211_sta_merge_ibss()
1307 if (ifibss->fixed_channel) in ieee80211_sta_merge_ibss()
1313 scan_width = cfg80211_chandef_to_scan_width(&ifibss->chandef); in ieee80211_sta_merge_ibss()
1314 ieee80211_request_ibss_scan(sdata, ifibss->ssid, ifibss->ssid_len, in ieee80211_sta_merge_ibss()
1320 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_sta_create_ibss() local
1327 if (ifibss->fixed_bssid) { in ieee80211_sta_create_ibss()
1328 memcpy(bssid, ifibss->bssid, ETH_ALEN); in ieee80211_sta_create_ibss()
1344 if (ifibss->privacy) in ieee80211_sta_create_ibss()
1348 &ifibss->chandef, ifibss->basic_rates, in ieee80211_sta_create_ibss()
1428 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_sta_find_ibss() local
1444 if (ifibss->fixed_bssid) in ieee80211_sta_find_ibss()
1445 bssid = ifibss->bssid; in ieee80211_sta_find_ibss()
1446 if (ifibss->fixed_channel) in ieee80211_sta_find_ibss()
1447 chan = ifibss->chandef.chan; in ieee80211_sta_find_ibss()
1448 if (!is_zero_ether_addr(ifibss->bssid)) in ieee80211_sta_find_ibss()
1449 bssid = ifibss->bssid; in ieee80211_sta_find_ibss()
1451 ifibss->ssid, ifibss->ssid_len, in ieee80211_sta_find_ibss()
1453 IEEE80211_PRIVACY(ifibss->privacy)); in ieee80211_sta_find_ibss()
1461 cbss->bssid, ifibss->bssid); in ieee80211_sta_find_ibss()
1474 if (ifibss->fixed_bssid && ifibss->fixed_channel) { in ieee80211_sta_find_ibss()
1485 if (time_after(jiffies, ifibss->last_scan_completed + in ieee80211_sta_find_ibss()
1492 scan_width = cfg80211_chandef_to_scan_width(&ifibss->chandef); in ieee80211_sta_find_ibss()
1494 if (ifibss->fixed_channel) { in ieee80211_sta_find_ibss()
1496 &ifibss->chandef, in ieee80211_sta_find_ibss()
1499 ieee80211_request_ibss_scan(sdata, ifibss->ssid, in ieee80211_sta_find_ibss()
1500 ifibss->ssid_len, channels, in ieee80211_sta_find_ibss()
1503 ieee80211_request_ibss_scan(sdata, ifibss->ssid, in ieee80211_sta_find_ibss()
1504 ifibss->ssid_len, NULL, in ieee80211_sta_find_ibss()
1510 if (time_after(jiffies, ifibss->ibss_join_req + in ieee80211_sta_find_ibss()
1514 mod_timer(&ifibss->timer, in ieee80211_sta_find_ibss()
1523 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_rx_mgmt_probe_req() local
1532 presp = rcu_dereference_protected(ifibss->presp, in ieee80211_rx_mgmt_probe_req()
1535 if (ifibss->state != IEEE80211_IBSS_MLME_JOINED || in ieee80211_rx_mgmt_probe_req()
1548 if (!ether_addr_equal(mgmt->bssid, ifibss->bssid) && in ieee80211_rx_mgmt_probe_req()
1561 (pos[1] != ifibss->ssid_len || in ieee80211_rx_mgmt_probe_req()
1562 memcmp(pos + 2, ifibss->ssid, ifibss->ssid_len))) { in ieee80211_rx_mgmt_probe_req()
1673 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_ibss_work() local
1683 if (!ifibss->ssid_len) in ieee80211_ibss_work()
1686 spin_lock_bh(&ifibss->incomplete_lock); in ieee80211_ibss_work()
1687 while (!list_empty(&ifibss->incomplete_stations)) { in ieee80211_ibss_work()
1688 sta = list_first_entry(&ifibss->incomplete_stations, in ieee80211_ibss_work()
1691 spin_unlock_bh(&ifibss->incomplete_lock); in ieee80211_ibss_work()
1695 spin_lock_bh(&ifibss->incomplete_lock); in ieee80211_ibss_work()
1697 spin_unlock_bh(&ifibss->incomplete_lock); in ieee80211_ibss_work()
1699 switch (ifibss->state) { in ieee80211_ibss_work()
1725 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_ibss_setup_sdata() local
1727 setup_timer(&ifibss->timer, ieee80211_ibss_timer, in ieee80211_ibss_setup_sdata()
1729 INIT_LIST_HEAD(&ifibss->incomplete_stations); in ieee80211_ibss_setup_sdata()
1730 spin_lock_init(&ifibss->incomplete_lock); in ieee80211_ibss_setup_sdata()
1731 INIT_WORK(&ifibss->csa_connection_drop_work, in ieee80211_ibss_setup_sdata()
1857 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; in ieee80211_ibss_leave() local
1860 ifibss->ssid_len = 0; in ieee80211_ibss_leave()
1861 eth_zero_addr(ifibss->bssid); in ieee80211_ibss_leave()
1867 memset(&ifibss->ht_capa, 0, sizeof(ifibss->ht_capa)); in ieee80211_ibss_leave()
1868 memset(&ifibss->ht_capa_mask, 0, sizeof(ifibss->ht_capa_mask)); in ieee80211_ibss_leave()