aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-10-13 05:36:21 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-10-13 05:36:21 -0400
commit61f6bba006d4e643fdff62c3d7fd4ea6ca4f468d (patch)
tree7b8ac32fb042e115651dd409f57aec3021964e65 /net/mac80211
parente2845c458ea27e924b0f2cbd647ba43e810305a5 (diff)
mac80211: use new cfg80211_inform_bss_frame_data() API
The new API is more easily extensible with a metadata struct passed to it, use it in mac80211. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ibss.c11
-rw-r--r--net/mac80211/scan.c19
2 files changed, 15 insertions, 15 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 7f72bc9bae2e..bd853e7bde93 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -229,7 +229,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
229 struct cfg80211_chan_def chandef; 229 struct cfg80211_chan_def chandef;
230 struct ieee80211_channel *chan; 230 struct ieee80211_channel *chan;
231 struct beacon_data *presp; 231 struct beacon_data *presp;
232 enum nl80211_bss_scan_width scan_width; 232 struct cfg80211_inform_bss bss_meta = {};
233 bool have_higher_than_11mbit; 233 bool have_higher_than_11mbit;
234 bool radar_required; 234 bool radar_required;
235 int err; 235 int err;
@@ -383,10 +383,11 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
383 mod_timer(&ifibss->timer, 383 mod_timer(&ifibss->timer,
384 round_jiffies(jiffies + IEEE80211_IBSS_MERGE_INTERVAL)); 384 round_jiffies(jiffies + IEEE80211_IBSS_MERGE_INTERVAL));
385 385
386 scan_width = cfg80211_chandef_to_scan_width(&chandef); 386 bss_meta.chan = chan;
387 bss = cfg80211_inform_bss_width_frame(local->hw.wiphy, chan, 387 bss_meta.scan_width = cfg80211_chandef_to_scan_width(&chandef);
388 scan_width, mgmt, 388 bss = cfg80211_inform_bss_frame_data(local->hw.wiphy, &bss_meta, mgmt,
389 presp->head_len, 0, GFP_KERNEL); 389 presp->head_len, GFP_KERNEL);
390
390 cfg80211_put_bss(local->hw.wiphy, bss); 391 cfg80211_put_bss(local->hw.wiphy, bss);
391 netif_carrier_on(sdata->dev); 392 netif_carrier_on(sdata->dev);
392 cfg80211_ibss_joined(sdata->dev, ifibss->bssid, chan, GFP_KERNEL); 393 cfg80211_ibss_joined(sdata->dev, ifibss->bssid, chan, GFP_KERNEL);
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 11d0901ebb7b..a368a1d6caff 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -67,24 +67,23 @@ ieee80211_bss_info_update(struct ieee80211_local *local,
67 struct cfg80211_bss *cbss; 67 struct cfg80211_bss *cbss;
68 struct ieee80211_bss *bss; 68 struct ieee80211_bss *bss;
69 int clen, srlen; 69 int clen, srlen;
70 enum nl80211_bss_scan_width scan_width; 70 struct cfg80211_inform_bss bss_meta = {};
71 s32 signal = 0;
72 bool signal_valid; 71 bool signal_valid;
73 72
74 if (ieee80211_hw_check(&local->hw, SIGNAL_DBM)) 73 if (ieee80211_hw_check(&local->hw, SIGNAL_DBM))
75 signal = rx_status->signal * 100; 74 bss_meta.signal = rx_status->signal * 100;
76 else if (ieee80211_hw_check(&local->hw, SIGNAL_UNSPEC)) 75 else if (ieee80211_hw_check(&local->hw, SIGNAL_UNSPEC))
77 signal = (rx_status->signal * 100) / local->hw.max_signal; 76 bss_meta.signal = (rx_status->signal * 100) / local->hw.max_signal;
78 77
79 scan_width = NL80211_BSS_CHAN_WIDTH_20; 78 bss_meta.scan_width = NL80211_BSS_CHAN_WIDTH_20;
80 if (rx_status->flag & RX_FLAG_5MHZ) 79 if (rx_status->flag & RX_FLAG_5MHZ)
81 scan_width = NL80211_BSS_CHAN_WIDTH_5; 80 bss_meta.scan_width = NL80211_BSS_CHAN_WIDTH_5;
82 if (rx_status->flag & RX_FLAG_10MHZ) 81 if (rx_status->flag & RX_FLAG_10MHZ)
83 scan_width = NL80211_BSS_CHAN_WIDTH_10; 82 bss_meta.scan_width = NL80211_BSS_CHAN_WIDTH_10;
84 83
85 cbss = cfg80211_inform_bss_width_frame(local->hw.wiphy, channel, 84 bss_meta.chan = channel;
86 scan_width, mgmt, len, signal, 85 cbss = cfg80211_inform_bss_frame_data(local->hw.wiphy, &bss_meta,
87 GFP_ATOMIC); 86 mgmt, len, GFP_ATOMIC);
88 if (!cbss) 87 if (!cbss)
89 return NULL; 88 return NULL;
90 /* In case the signal is invalid update the status */ 89 /* In case the signal is invalid update the status */