Lines Matching refs:sdata

57 update_vlan_tailroom_need_count(struct ieee80211_sub_if_data *sdata, int delta)
61 if (sdata->vif.type != NL80211_IFTYPE_AP)
65 lockdep_assert_wiphy(sdata->local->hw.wiphy);
69 list_for_each_entry_rcu(vlan, &sdata->u.ap.vlans, u.vlan.list)
75 static void increment_tailroom_need_count(struct ieee80211_sub_if_data *sdata)
96 lockdep_assert_wiphy(sdata->local->hw.wiphy);
98 update_vlan_tailroom_need_count(sdata, 1);
100 if (!sdata->crypto_tx_tailroom_needed_cnt++) {
109 static void decrease_tailroom_need_count(struct ieee80211_sub_if_data *sdata,
112 lockdep_assert_wiphy(sdata->local->hw.wiphy);
114 WARN_ON_ONCE(sdata->crypto_tx_tailroom_needed_cnt < delta);
116 update_vlan_tailroom_need_count(sdata, -delta);
117 sdata->crypto_tx_tailroom_needed_cnt -= delta;
122 struct ieee80211_sub_if_data *sdata = key->sdata;
141 increment_tailroom_need_count(sdata);
163 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
174 if (key->conf.link_id >= 0 && sdata->vif.active_links &&
175 !(sdata->vif.active_links & BIT(key->conf.link_id)))
178 ret = drv_set_key(key->local, SET_KEY, sdata,
187 decrease_tailroom_need_count(sdata, 1);
199 sdata_err(sdata,
230 struct ieee80211_sub_if_data *sdata;
243 sdata = key->sdata;
247 if (key->conf.link_id >= 0 && sdata->vif.active_links &&
248 !(sdata->vif.active_links & BIT(key->conf.link_id)))
254 increment_tailroom_need_count(sdata);
257 ret = drv_set_key(key->local, DISABLE_KEY, sdata,
261 sdata_err(sdata,
342 ieee80211_flush_queues(local, old->sdata, false);
350 struct ieee80211_sub_if_data *sdata = link->sdata;
353 lockdep_assert_wiphy(sdata->local->hw.wiphy);
356 key = wiphy_dereference(sdata->local->hw.wiphy,
357 sdata->keys[idx]);
359 key = wiphy_dereference(sdata->local->hw.wiphy,
364 rcu_assign_pointer(sdata->default_unicast_key, key);
365 ieee80211_check_fast_xmit_iface(sdata);
366 if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN)
367 drv_set_default_unicast_key(sdata->local, sdata, idx);
373 ieee80211_debugfs_key_update_default(sdata);
379 lockdep_assert_wiphy(link->sdata->local->hw.wiphy);
387 struct ieee80211_sub_if_data *sdata = link->sdata;
390 lockdep_assert_wiphy(sdata->local->hw.wiphy);
394 key = wiphy_dereference(sdata->local->hw.wiphy,
399 ieee80211_debugfs_key_update_default(sdata);
405 lockdep_assert_wiphy(link->sdata->local->hw.wiphy);
413 struct ieee80211_sub_if_data *sdata = link->sdata;
416 lockdep_assert_wiphy(sdata->local->hw.wiphy);
421 key = wiphy_dereference(sdata->local->hw.wiphy,
426 ieee80211_debugfs_key_update_default(sdata);
432 lockdep_assert_wiphy(link->sdata->local->hw.wiphy);
437 static int ieee80211_key_replace(struct ieee80211_sub_if_data *sdata,
451 lockdep_assert_wiphy(sdata->local->hw.wiphy);
476 link = sdata_dereference(sdata->link[link_id], sdata);
488 link = &sdata->deflink;
521 list_add_tail_rcu(&new->list, &sdata->key_list);
540 old == wiphy_dereference(sdata->local->hw.wiphy,
541 sdata->default_unicast_key);
543 old == wiphy_dereference(sdata->local->hw.wiphy,
546 old == wiphy_dereference(sdata->local->hw.wiphy,
549 old == wiphy_dereference(sdata->local->hw.wiphy,
562 rcu_assign_pointer(sdata->keys[idx], new);
767 struct ieee80211_sub_if_data *sdata = key->sdata;
773 sdata->crypto_tx_tailroom_pending_dec++;
774 wiphy_delayed_work_queue(sdata->local->hw.wiphy,
775 &sdata->dec_tailroom_needed_wk,
778 decrease_tailroom_need_count(sdata, 1);
805 WARN_ON(key->sdata || key->local);
809 static bool ieee80211_key_identical(struct ieee80211_sub_if_data *sdata,
827 if (sdata->vif.type == NL80211_IFTYPE_STATION &&
846 struct ieee80211_sub_if_data *sdata = link->sdata;
856 bool delay_tailroom = sdata->vif.type == NL80211_IFTYPE_STATION;
859 lockdep_assert_wiphy(sdata->local->hw.wiphy);
864 old_key = wiphy_dereference(sdata->local->hw.wiphy,
866 alt_key = wiphy_dereference(sdata->local->hw.wiphy,
890 old_key = wiphy_dereference(sdata->local->hw.wiphy,
894 old_key = wiphy_dereference(sdata->local->hw.wiphy,
895 sdata->keys[idx]);
897 old_key = wiphy_dereference(sdata->local->hw.wiphy,
913 if (ieee80211_key_identical(sdata, old_key, key)) {
918 key->local = sdata->local;
919 key->sdata = sdata;
932 increment_tailroom_need_count(sdata);
934 ret = ieee80211_key_replace(sdata, link, sta, pairwise, old_key, key);
958 if (key->sdata)
959 ieee80211_key_replace(key->sdata, NULL, key->sta,
965 void ieee80211_reenable_keys(struct ieee80211_sub_if_data *sdata)
970 lockdep_assert_wiphy(sdata->local->hw.wiphy);
972 sdata->crypto_tx_tailroom_needed_cnt = 0;
973 sdata->crypto_tx_tailroom_pending_dec = 0;
975 if (sdata->vif.type == NL80211_IFTYPE_AP) {
976 list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) {
982 if (ieee80211_sdata_running(sdata)) {
983 list_for_each_entry(key, &sdata->key_list, list) {
984 increment_tailroom_need_count(sdata);
1001 struct ieee80211_sub_if_data *sdata;
1006 sdata = vif_to_sdata(vif);
1007 list_for_each_entry_safe(key, tmp, &sdata->key_list, list)
1008 iter(hw, &sdata->vif,
1012 list_for_each_entry(sdata, &local->interfaces, list)
1014 &sdata->key_list, list)
1015 iter(hw, &sdata->vif,
1024 struct ieee80211_sub_if_data *sdata,
1034 list_for_each_entry_rcu(key, &sdata->key_list, list) {
1041 iter(hw, &sdata->vif,
1057 struct ieee80211_sub_if_data *sdata;
1060 sdata = vif_to_sdata(vif);
1061 _ieee80211_iter_keys_rcu(hw, sdata, iter, iter_data);
1063 list_for_each_entry_rcu(sdata, &local->interfaces, list)
1064 _ieee80211_iter_keys_rcu(hw, sdata, iter, iter_data);
1069 static void ieee80211_free_keys_iface(struct ieee80211_sub_if_data *sdata,
1074 decrease_tailroom_need_count(sdata,
1075 sdata->crypto_tx_tailroom_pending_dec);
1076 sdata->crypto_tx_tailroom_pending_dec = 0;
1078 ieee80211_debugfs_key_remove_mgmt_default(sdata);
1079 ieee80211_debugfs_key_remove_beacon_default(sdata);
1081 list_for_each_entry_safe(key, tmp, &sdata->key_list, list) {
1082 ieee80211_key_replace(key->sdata, NULL, key->sta,
1088 ieee80211_debugfs_key_update_default(sdata);
1094 struct ieee80211_sub_if_data *sdata = link->sdata;
1095 struct ieee80211_local *local = sdata->local;
1100 list_for_each_entry_safe(key, tmp, &sdata->key_list, list) {
1103 ieee80211_key_replace(key->sdata, link, key->sta,
1121 void ieee80211_free_keys(struct ieee80211_sub_if_data *sdata,
1124 struct ieee80211_local *local = sdata->local;
1131 &sdata->dec_tailroom_needed_wk);
1135 ieee80211_free_keys_iface(sdata, &keys);
1137 if (sdata->vif.type == NL80211_IFTYPE_AP) {
1138 list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list)
1147 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
1148 if (sdata->bss) {
1149 master = container_of(sdata->bss,
1153 WARN_ON_ONCE(sdata->crypto_tx_tailroom_needed_cnt !=
1157 WARN_ON_ONCE(sdata->crypto_tx_tailroom_needed_cnt ||
1158 sdata->crypto_tx_tailroom_pending_dec);
1161 if (sdata->vif.type == NL80211_IFTYPE_AP) {
1162 list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list)
1180 ieee80211_key_replace(key->sdata, NULL, key->sta,
1183 __ieee80211_key_destroy(key, key->sdata->vif.type ==
1191 ieee80211_key_replace(key->sdata, NULL, key->sta,
1194 __ieee80211_key_destroy(key, key->sdata->vif.type ==
1202 struct ieee80211_sub_if_data *sdata;
1204 sdata = container_of(wk, struct ieee80211_sub_if_data,
1223 decrease_tailroom_need_count(sdata,
1224 sdata->crypto_tx_tailroom_pending_dec);
1225 sdata->crypto_tx_tailroom_pending_dec = 0;
1231 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
1233 trace_api_gtk_rekey_notify(sdata, bssid, replay_ctr);
1235 cfg80211_gtk_rekey_notify(sdata->dev, bssid, replay_ctr, gfp);
1366 increment_tailroom_need_count(key->sdata);
1378 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
1379 struct ieee80211_local *local = sdata->local;
1383 link_id < 0 ? &sdata->deflink :
1384 sdata_dereference(sdata->link[link_id], sdata);
1401 if (sdata->u.mgd.mfp != IEEE80211_MFP_DISABLED)
1463 int ieee80211_key_switch_links(struct ieee80211_sub_if_data *sdata,
1470 list_for_each_entry(key, &sdata->key_list, list) {
1481 list_for_each_entry(key, &sdata->key_list, list) {