aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-04-13 17:58:51 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-13 17:58:51 -0400
commit71bbe25d01fa4f35551ff7bffc3e03ddd3e960cd (patch)
treed32c77e506192ef0ba62a10e92aac410eccaa575 /net/mac80211/util.c
parent7d45a04cbc2683f9552572850f1c711d9b96dd26 (diff)
parent57fbcce37be7c1d2622b56587c10ade00e96afa3 (diff)
Merge tag 'mac80211-next-for-davem-2016-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says: ==================== To synchronize with Kalle, here's just a big change that affects all drivers - removing the duplicated enum ieee80211_band and replacing it by enum nl80211_band. On top of that, just a small documentation update. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 0319d6d4f863..905003f75c4d 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -59,7 +59,7 @@ void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx)
59 } 59 }
60} 60}
61 61
62int ieee80211_frame_duration(enum ieee80211_band band, size_t len, 62int ieee80211_frame_duration(enum nl80211_band band, size_t len,
63 int rate, int erp, int short_preamble, 63 int rate, int erp, int short_preamble,
64 int shift) 64 int shift)
65{ 65{
@@ -77,7 +77,7 @@ int ieee80211_frame_duration(enum ieee80211_band band, size_t len,
77 * is assumed to be 0 otherwise. 77 * is assumed to be 0 otherwise.
78 */ 78 */
79 79
80 if (band == IEEE80211_BAND_5GHZ || erp) { 80 if (band == NL80211_BAND_5GHZ || erp) {
81 /* 81 /*
82 * OFDM: 82 * OFDM:
83 * 83 *
@@ -129,7 +129,7 @@ int ieee80211_frame_duration(enum ieee80211_band band, size_t len,
129/* Exported duration function for driver use */ 129/* Exported duration function for driver use */
130__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, 130__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
131 struct ieee80211_vif *vif, 131 struct ieee80211_vif *vif,
132 enum ieee80211_band band, 132 enum nl80211_band band,
133 size_t frame_len, 133 size_t frame_len,
134 struct ieee80211_rate *rate) 134 struct ieee80211_rate *rate)
135{ 135{
@@ -1129,7 +1129,7 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata,
1129 rcu_read_lock(); 1129 rcu_read_lock();
1130 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); 1130 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
1131 use_11b = (chanctx_conf && 1131 use_11b = (chanctx_conf &&
1132 chanctx_conf->def.chan->band == IEEE80211_BAND_2GHZ) && 1132 chanctx_conf->def.chan->band == NL80211_BAND_2GHZ) &&
1133 !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE); 1133 !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE);
1134 rcu_read_unlock(); 1134 rcu_read_unlock();
1135 1135
@@ -1301,7 +1301,7 @@ void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
1301static int ieee80211_build_preq_ies_band(struct ieee80211_local *local, 1301static int ieee80211_build_preq_ies_band(struct ieee80211_local *local,
1302 u8 *buffer, size_t buffer_len, 1302 u8 *buffer, size_t buffer_len,
1303 const u8 *ie, size_t ie_len, 1303 const u8 *ie, size_t ie_len,
1304 enum ieee80211_band band, 1304 enum nl80211_band band,
1305 u32 rate_mask, 1305 u32 rate_mask,
1306 struct cfg80211_chan_def *chandef, 1306 struct cfg80211_chan_def *chandef,
1307 size_t *offset) 1307 size_t *offset)
@@ -1375,7 +1375,7 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_local *local,
1375 pos += ext_rates_len; 1375 pos += ext_rates_len;
1376 } 1376 }
1377 1377
1378 if (chandef->chan && sband->band == IEEE80211_BAND_2GHZ) { 1378 if (chandef->chan && sband->band == NL80211_BAND_2GHZ) {
1379 if (end - pos < 3) 1379 if (end - pos < 3)
1380 goto out_err; 1380 goto out_err;
1381 *pos++ = WLAN_EID_DS_PARAMS; 1381 *pos++ = WLAN_EID_DS_PARAMS;
@@ -1479,7 +1479,7 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
1479 1479
1480 memset(ie_desc, 0, sizeof(*ie_desc)); 1480 memset(ie_desc, 0, sizeof(*ie_desc));
1481 1481
1482 for (i = 0; i < IEEE80211_NUM_BANDS; i++) { 1482 for (i = 0; i < NUM_NL80211_BANDS; i++) {
1483 if (bands_used & BIT(i)) { 1483 if (bands_used & BIT(i)) {
1484 pos += ieee80211_build_preq_ies_band(local, 1484 pos += ieee80211_build_preq_ies_band(local,
1485 buffer + pos, 1485 buffer + pos,
@@ -1522,7 +1522,7 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
1522 struct sk_buff *skb; 1522 struct sk_buff *skb;
1523 struct ieee80211_mgmt *mgmt; 1523 struct ieee80211_mgmt *mgmt;
1524 int ies_len; 1524 int ies_len;
1525 u32 rate_masks[IEEE80211_NUM_BANDS] = {}; 1525 u32 rate_masks[NUM_NL80211_BANDS] = {};
1526 struct ieee80211_scan_ies dummy_ie_desc; 1526 struct ieee80211_scan_ies dummy_ie_desc;
1527 1527
1528 /* 1528 /*
@@ -1582,7 +1582,7 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata,
1582 1582
1583u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata, 1583u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata,
1584 struct ieee802_11_elems *elems, 1584 struct ieee802_11_elems *elems,
1585 enum ieee80211_band band, u32 *basic_rates) 1585 enum nl80211_band band, u32 *basic_rates)
1586{ 1586{
1587 struct ieee80211_supported_band *sband; 1587 struct ieee80211_supported_band *sband;
1588 size_t num_rates; 1588 size_t num_rates;
@@ -2520,7 +2520,7 @@ int ieee80211_parse_bitrates(struct cfg80211_chan_def *chandef,
2520 2520
2521int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, 2521int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata,
2522 struct sk_buff *skb, bool need_basic, 2522 struct sk_buff *skb, bool need_basic,
2523 enum ieee80211_band band) 2523 enum nl80211_band band)
2524{ 2524{
2525 struct ieee80211_local *local = sdata->local; 2525 struct ieee80211_local *local = sdata->local;
2526 struct ieee80211_supported_band *sband; 2526 struct ieee80211_supported_band *sband;
@@ -2565,7 +2565,7 @@ int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata,
2565 2565
2566int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, 2566int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
2567 struct sk_buff *skb, bool need_basic, 2567 struct sk_buff *skb, bool need_basic,
2568 enum ieee80211_band band) 2568 enum nl80211_band band)
2569{ 2569{
2570 struct ieee80211_local *local = sdata->local; 2570 struct ieee80211_local *local = sdata->local;
2571 struct ieee80211_supported_band *sband; 2571 struct ieee80211_supported_band *sband;
@@ -2711,7 +2711,7 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local,
2711 2711
2712 if (status->flag & RX_FLAG_MACTIME_PLCP_START) { 2712 if (status->flag & RX_FLAG_MACTIME_PLCP_START) {
2713 /* TODO: handle HT/VHT preambles */ 2713 /* TODO: handle HT/VHT preambles */
2714 if (status->band == IEEE80211_BAND_5GHZ) { 2714 if (status->band == NL80211_BAND_5GHZ) {
2715 ts += 20 << shift; 2715 ts += 20 << shift;
2716 mpdu_offset += 2; 2716 mpdu_offset += 2;
2717 } else if (status->flag & RX_FLAG_SHORTPRE) { 2717 } else if (status->flag & RX_FLAG_SHORTPRE) {