• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/net/mac80211/

Lines Matching defs:sdata

108 void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata)
110 if (sdata->local->hw.flags & IEEE80211_HW_BEACON_FILTER)
113 mod_timer(&sdata->u.mgd.bcn_mon_timer,
117 void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata)
119 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
121 if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR)
124 mod_timer(&sdata->u.mgd.conn_mon_timer,
140 static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
144 struct ieee80211_local *local = sdata->local;
155 prev_chantype = sdata->vif.bss_conf.channel_type;
190 if (!ieee80211_set_channel_type(local, sdata, channel_type)) {
193 WARN_ON(!ieee80211_set_channel_type(local, sdata, channel_type));
201 sta = sta_info_get(sdata, bssid);
212 if (sdata->ht_opmode_valid != enable_ht ||
213 sdata->vif.bss_conf.ht_operation_mode != ht_opmode ||
216 sdata->vif.bss_conf.ht_operation_mode = ht_opmode;
217 sdata->ht_opmode_valid = enable_ht;
225 static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
229 struct ieee80211_local *local = sdata->local;
230 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
237 "deauth/disassoc frame\n", sdata->name);
245 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
254 __cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
256 cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
259 __cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
261 cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
266 ieee80211_tx_skb(sdata, skb);
272 struct ieee80211_sub_if_data *sdata)
277 skb = ieee80211_pspoll_get(&local->hw, &sdata->vif);
285 ieee80211_tx_skb(sdata, skb);
289 struct ieee80211_sub_if_data *sdata,
295 skb = ieee80211_nullfunc_get(&local->hw, &sdata->vif);
304 ieee80211_tx_skb(sdata, skb);
308 struct ieee80211_sub_if_data *sdata)
314 if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION))
320 "nullfunc frame\n", sdata->name);
330 memcpy(nullfunc->addr1, sdata->u.mgd.bssid, ETH_ALEN);
331 memcpy(nullfunc->addr2, sdata->vif.addr, ETH_ALEN);
332 memcpy(nullfunc->addr3, sdata->u.mgd.bssid, ETH_ALEN);
333 memcpy(nullfunc->addr4, sdata->vif.addr, ETH_ALEN);
336 ieee80211_tx_skb(sdata, skb);
342 struct ieee80211_sub_if_data *sdata =
344 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
346 if (!ieee80211_sdata_running(sdata))
353 sdata->local->oper_channel = sdata->local->csa_channel;
354 if (!sdata->local->ops->channel_switch) {
356 ieee80211_hw_config(sdata->local,
360 ifmgd->associated->channel = sdata->local->oper_channel;
362 ieee80211_wake_queues_by_reason(&sdata->local->hw,
371 struct ieee80211_sub_if_data *sdata;
374 sdata = vif_to_sdata(vif);
375 ifmgd = &sdata->u.mgd;
377 trace_api_chswitch_done(sdata, success);
385 sdata->local->csa_channel = sdata->local->oper_channel;
388 ieee80211_queue_work(&sdata->local->hw, &ifmgd->chswitch_work);
394 struct ieee80211_sub_if_data *sdata =
396 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
398 if (sdata->local->quiescing) {
403 ieee80211_queue_work(&sdata->local->hw, &ifmgd->chswitch_work);
406 void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
414 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
422 if (sdata->local->scanning)
431 new_ch = ieee80211_get_channel(sdata->local->hw.wiphy, new_freq);
435 sdata->local->csa_channel = new_ch;
437 if (sdata->local->ops->channel_switch) {
444 ieee80211_stop_queues_by_reason(&sdata->local->hw,
450 drv_channel_switch(sdata->local, &ch_switch);
456 ieee80211_queue_work(&sdata->local->hw, &ifmgd->chswitch_work);
459 ieee80211_stop_queues_by_reason(&sdata->local->hw,
469 static void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
473 struct ieee80211_conf *conf = &sdata->local->hw.conf;
483 (*pwr_constr_elem != sdata->local->power_constr_level)) {
484 sdata->local->power_constr_level = *pwr_constr_elem;
485 ieee80211_hw_config(sdata->local, 0);
491 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
492 struct ieee80211_local *local = sdata->local;
495 WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION ||
506 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
507 struct ieee80211_local *local = sdata->local;
510 WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION ||
524 struct ieee80211_sub_if_data *sdata)
541 ieee80211_send_nullfunc(local, sdata, 1);
569 struct ieee80211_sub_if_data *sdata, *found = NULL;
583 list_for_each_entry(sdata, &local->interfaces, list) {
584 if (!ieee80211_sdata_running(sdata))
586 if (sdata->vif.type != NL80211_IFTYPE_STATION)
588 found = sdata;
674 struct ieee80211_sub_if_data *sdata = local->ps_sdata;
675 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
678 if (!sdata)
686 ieee80211_send_nullfunc(local, sdata, 1);
709 struct ieee80211_sub_if_data *sdata,
713 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
802 sdata->vif.bss_conf.qos = true;
803 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_QOS);
806 static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata,
809 struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
824 if (sdata->local->hw.conf.channel->band == IEEE80211_BAND_5GHZ)
845 static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
850 struct ieee80211_local *local = sdata->local;
851 struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
859 bss_info_changed |= ieee80211_handle_bss_capability(sdata,
862 sdata->u.mgd.associated = cbss;
863 memcpy(sdata->u.mgd.bssid, cbss->bssid, ETH_ALEN);
865 sdata->u.mgd.flags |= IEEE80211_STA_RESET_SIGNAL_AVE;
868 sdata->u.mgd.flags &= ~(IEEE80211_STA_CONNECTION_POLL |
877 sdata->u.mgd.wmm_last_param_set = -1;
903 if (bss_conf->arp_filter_enabled != sdata->arp_filter_state) {
904 bss_conf->arp_filter_enabled = sdata->arp_filter_state;
908 ieee80211_bss_info_change_notify(sdata, bss_info_changed);
912 ieee80211_recalc_smps(local, sdata);
915 netif_tx_start_all_queues(sdata->dev);
916 netif_carrier_on(sdata->dev);
919 static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
922 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
923 struct ieee80211_local *local = sdata->local;
952 netif_tx_stop_all_queues(sdata->dev);
953 netif_carrier_off(sdata->dev);
956 sta = sta_info_get(sdata, bssid);
963 changed |= ieee80211_reset_erp_info(sdata);
967 sdata->vif.bss_conf.assoc = false;
969 ieee80211_set_wmm_default(sdata);
972 WARN_ON(!ieee80211_set_channel_type(local, sdata, NL80211_CHAN_NO_HT));
975 sdata->ht_opmode_valid = false;
990 if (sdata->vif.bss_conf.arp_filter_enabled) {
991 sdata->vif.bss_conf.arp_filter_enabled = false;
997 ieee80211_bss_info_change_notify(sdata, changed);
1000 sta_info_destroy_addr(sdata, bssid);
1003 void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
1017 ieee80211_sta_reset_conn_monitor(sdata);
1020 static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
1022 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1036 ieee80211_send_probe_req(sdata, dst, ssid + 2, ssid[1], NULL, 0);
1043 static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata,
1046 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1049 if (!ieee80211_sdata_running(sdata))
1052 if (sdata->local->scanning)
1055 if (sdata->local->tmp_channel)
1066 "- sending probe request\n", sdata->name);
1092 mutex_lock(&sdata->local->iflist_mtx);
1093 ieee80211_recalc_ps(sdata->local, -1);
1094 mutex_unlock(&sdata->local->iflist_mtx);
1097 ieee80211_mgd_probe_ap_send(sdata);
1102 static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata)
1104 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1105 struct ieee80211_local *local = sdata->local;
1118 ieee80211_set_disassoc(sdata, true);
1125 ieee80211_send_deauth_disassoc(sdata, bssid,
1133 struct ieee80211_sub_if_data *sdata =
1137 if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR)
1138 __ieee80211_connection_loss(sdata);
1140 ieee80211_mgd_probe_ap(sdata, true);
1145 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
1146 struct ieee80211_hw *hw = &sdata->local->hw;
1148 trace_api_beacon_loss(sdata);
1151 ieee80211_queue_work(hw, &sdata->u.mgd.beacon_connection_loss_work);
1157 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
1158 struct ieee80211_hw *hw = &sdata->local->hw;
1160 trace_api_connection_loss(sdata);
1163 ieee80211_queue_work(hw, &sdata->u.mgd.beacon_connection_loss_work);
1169 ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata,
1172 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1186 sdata->name, bssid, reason_code);
1188 ieee80211_set_disassoc(sdata, true);
1189 ieee80211_recalc_idle(sdata->local);
1196 ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
1199 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1216 sdata->name, mgmt->sa, reason_code);
1218 ieee80211_set_disassoc(sdata, true);
1219 ieee80211_recalc_idle(sdata->local);
1227 struct ieee80211_sub_if_data *sdata = wk->sdata;
1228 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1229 struct ieee80211_local *local = sdata->local;
1237 struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
1250 "set\n", sdata->name, aid);
1258 sdata->name);
1264 sta = sta_info_alloc(sdata, cbss->bssid, GFP_KERNEL);
1267 " the AP\n", sdata->name);
1315 sdata->vif.bss_conf.basic_rates = basic_rates;
1320 sdata->flags |= IEEE80211_SDATA_OPERATING_GMODE;
1322 sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;
1342 " the AP (error %d)\n", sdata->name, err);
1347 ieee80211_sta_wmm_params(local, sdata, elems.wmm_param,
1350 ieee80211_set_wmm_default(sdata);
1355 (sdata->local->hw.queues >= 4) &&
1357 changed |= ieee80211_enable_ht(sdata, elems.ht_info_elem,
1364 ieee80211_set_associated(sdata, cbss, changed);
1371 ieee80211_send_4addr_nullfunc(local, sdata);
1377 ieee80211_sta_rx_notify(sdata, (struct ieee80211_hdr *)mgmt);
1378 ieee80211_sta_reset_beacon_monitor(sdata);
1384 static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
1391 struct ieee80211_local *local = sdata->local;
1397 if (sdata->u.mgd.associated) {
1398 bss = (void *)sdata->u.mgd.associated->priv;
1418 if (!sdata->u.mgd.associated)
1428 (memcmp(mgmt->bssid, sdata->u.mgd.associated->bssid,
1432 ieee80211_sta_process_chanswitch(sdata, sw_elem,
1438 static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,
1447 ifmgd = &sdata->u.mgd;
1451 if (memcmp(mgmt->da, sdata->vif.addr, ETH_ALEN))
1461 ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems, false);
1469 mutex_lock(&sdata->local->iflist_mtx);
1470 ieee80211_recalc_ps(sdata->local, -1);
1471 mutex_unlock(&sdata->local->iflist_mtx);
1473 if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR)
1481 ieee80211_sta_reset_beacon_monitor(sdata);
1497 static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
1502 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1503 struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
1506 struct ieee80211_local *local = sdata->local;
1561 &sdata->vif,
1568 &sdata->vif,
1578 "to a received beacon\n", sdata->name);
1591 ieee80211_sta_reset_beacon_monitor(sdata);
1603 ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems,
1606 ieee80211_sta_wmm_params(local, sdata, elems.wmm_param,
1616 ieee80211_send_nullfunc(local, sdata, 0);
1628 ieee80211_send_pspoll(local, sdata);
1643 changed |= ieee80211_handle_bss_capability(sdata,
1656 sta = sta_info_get(sdata, bssid);
1671 changed |= ieee80211_enable_ht(sdata, elems.ht_info_elem,
1679 ieee80211_handle_pwr_constr(sdata,
1685 ieee80211_bss_info_change_notify(sdata, changed);
1688 void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
1691 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1707 ieee80211_rx_mgmt_beacon(sdata, mgmt, skb->len,
1711 ieee80211_rx_mgmt_probe_resp(sdata, skb);
1714 rma = ieee80211_rx_mgmt_deauth(sdata, mgmt, skb->len);
1717 rma = ieee80211_rx_mgmt_disassoc(sdata, mgmt, skb->len);
1722 ieee80211_sta_process_chanswitch(sdata,
1736 cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
1739 cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
1751 struct ieee80211_local *local = sdata->local;
1756 if (wk->sdata != sdata)
1779 sdata->name, mgmt->bssid,
1788 cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
1794 struct ieee80211_sub_if_data *sdata =
1796 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1797 struct ieee80211_local *local = sdata->local;
1804 ieee80211_queue_work(&local->hw, &sdata->work);
1807 void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata)
1809 struct ieee80211_local *local = sdata->local;
1810 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1831 ieee80211_mgd_probe_ap_send(sdata);
1842 ieee80211_set_disassoc(sdata, true);
1849 ieee80211_send_deauth_disassoc(sdata, bssid,
1862 struct ieee80211_sub_if_data *sdata =
1864 struct ieee80211_local *local = sdata->local;
1869 ieee80211_queue_work(&sdata->local->hw,
1870 &sdata->u.mgd.beacon_connection_loss_work);
1875 struct ieee80211_sub_if_data *sdata =
1877 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1878 struct ieee80211_local *local = sdata->local;
1888 struct ieee80211_sub_if_data *sdata =
1892 ieee80211_mgd_probe_ap(sdata, false);
1895 static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
1897 if (sdata->vif.type == NL80211_IFTYPE_STATION) {
1898 sdata->u.mgd.flags &= ~(IEEE80211_STA_BEACON_POLL |
1902 ieee80211_queue_work(&sdata->local->hw,
1903 &sdata->u.mgd.monitor_work);
1905 ieee80211_queue_work(&sdata->local->hw, &sdata->work);
1910 void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata)
1912 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1934 void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata)
1936 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
1946 void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata)
1950 ifmgd = &sdata->u.mgd;
1956 (unsigned long) sdata);
1958 (unsigned long) sdata);
1960 (unsigned long) sdata);
1962 (unsigned long) sdata);
1968 if (sdata->local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS)
1977 struct ieee80211_sub_if_data *sdata = local->scan_sdata;
1981 list_for_each_entry_rcu(sdata, &local->interfaces, list)
1982 ieee80211_restart_sta_timer(sdata);
2007 cfg80211_send_auth_timeout(wk->sdata->dev, wk->filter_ta);
2012 cfg80211_send_rx_auth(wk->sdata->dev, skb->data, skb->len);
2016 mutex_lock(&wk->sdata->u.mgd.mtx);
2017 ieee80211_rx_mgmt_probe_resp(wk->sdata, skb);
2018 mutex_unlock(&wk->sdata->u.mgd.mtx);
2025 int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
2040 if (IS_ERR(sdata->local->wep_tx_tfm))
2084 wk->sdata = sdata;
2100 cfg80211_send_assoc_timeout(wk->sdata->dev, wk->filter_ta);
2105 mutex_lock(&wk->sdata->u.mgd.mtx);
2108 ieee80211_rx_bss_info(wk->sdata, (void *)skb->data, skb->len, rx_status,
2110 mutex_unlock(&wk->sdata->u.mgd.mtx);
2121 mutex_lock(&wk->sdata->u.mgd.mtx);
2123 mutex_unlock(&wk->sdata->u.mgd.mtx);
2125 cfg80211_send_assoc_timeout(wk->sdata->dev,
2130 mutex_unlock(&wk->sdata->u.mgd.mtx);
2133 cfg80211_send_rx_assoc(wk->sdata->dev, skb->data, skb->len);
2137 int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
2140 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
2161 ieee80211_set_disassoc(sdata, true);
2215 (sdata->local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD)) {
2231 wk->sdata = sdata;
2234 sdata->local->hw.flags & IEEE80211_HW_NEED_DTIM_PERIOD)
2256 int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
2260 struct ieee80211_local *local = sdata->local;
2261 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
2270 ieee80211_set_disassoc(sdata, false);
2280 if (wk->sdata != sdata)
2308 __cfg80211_auth_canceled(sdata->dev, bssid);
2314 sdata->name, bssid, req->reason_code);
2316 ieee80211_send_deauth_disassoc(sdata, bssid, IEEE80211_STYPE_DEAUTH,
2320 sta_info_destroy_addr(sdata, bssid);
2322 ieee80211_recalc_idle(sdata->local);
2327 int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
2331 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
2348 sdata->name, req->bss->bssid, req->reason_code);
2351 ieee80211_set_disassoc(sdata, false);
2355 ieee80211_send_deauth_disassoc(sdata, req->bss->bssid,
2358 sta_info_destroy_addr(sdata, bssid);
2360 ieee80211_recalc_idle(sdata->local);
2369 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
2371 trace_api_cqm_rssi_notify(sdata, rssi_event);
2373 cfg80211_cqm_rssi_notify(sdata->dev, rssi_event, gfp);