aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath9k/rc.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-rs.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c6
-rw-r--r--include/net/mac80211.h2
-rw-r--r--net/mac80211/cfg.c2
-rw-r--r--net/mac80211/mesh_plink.c4
-rw-r--r--net/mac80211/mlme.c12
-rw-r--r--net/mac80211/rate.h2
-rw-r--r--net/mac80211/sta_info.h2
9 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c
index 390019ed398..226d70c73fe 100644
--- a/drivers/net/wireless/ath9k/rc.c
+++ b/drivers/net/wireless/ath9k/rc.c
@@ -1825,7 +1825,7 @@ static void ath_setup_rates(struct ieee80211_local *local, struct sta_info *sta)
1825 1825
1826 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 1826 sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
1827 for (i = 0; i < sband->n_bitrates; i++) { 1827 for (i = 0; i < sband->n_bitrates; i++) {
1828 if (sta->supp_rates[local->hw.conf.channel->band] & BIT(i)) { 1828 if (sta->sta.supp_rates[local->hw.conf.channel->band] & BIT(i)) {
1829 rc_priv->neg_rates.rs_rates[j] 1829 rc_priv->neg_rates.rs_rates[j]
1830 = (sband->bitrates[i].bitrate * 2) / 10; 1830 = (sband->bitrates[i].bitrate * 2) / 10;
1831 j++; 1831 j++;
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index 46b672c3458..f751b909759 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -333,7 +333,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
333 * after assoc.. */ 333 * after assoc.. */
334 334
335 for (i = IWL_RATE_COUNT - 1; i >= 0; i--) { 335 for (i = IWL_RATE_COUNT - 1; i >= 0; i--) {
336 if (sta->supp_rates[local->hw.conf.channel->band] & (1 << i)) { 336 if (sta->sta.supp_rates[local->hw.conf.channel->band] & (1 << i)) {
337 sta->txrate_idx = i; 337 sta->txrate_idx = i;
338 break; 338 break;
339 } 339 }
@@ -680,7 +680,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
680 680
681 rs_sta = (void *)sta->rate_ctrl_priv; 681 rs_sta = (void *)sta->rate_ctrl_priv;
682 682
683 rate_mask = sta->supp_rates[sband->band]; 683 rate_mask = sta->sta.supp_rates[sband->band];
684 index = min(rs_sta->last_txrate_idx & 0xffff, IWL_RATE_COUNT - 1); 684 index = min(rs_sta->last_txrate_idx & 0xffff, IWL_RATE_COUNT - 1);
685 685
686 if (sband->band == IEEE80211_BAND_5GHZ) 686 if (sband->band == IEEE80211_BAND_5GHZ)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 54f076bb202..f7191a9a7fb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -1731,7 +1731,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1731 return; 1731 return;
1732 1732
1733 lq_sta = (struct iwl_lq_sta *)sta->rate_ctrl_priv; 1733 lq_sta = (struct iwl_lq_sta *)sta->rate_ctrl_priv;
1734 lq_sta->supp_rates = sta->supp_rates[lq_sta->band]; 1734 lq_sta->supp_rates = sta->sta.supp_rates[lq_sta->band];
1735 1735
1736 tid = rs_tl_add_packet(lq_sta, hdr); 1736 tid = rs_tl_add_packet(lq_sta, hdr);
1737 1737
@@ -2233,7 +2233,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
2233 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 2233 sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
2234 2234
2235 lq_sta->flush_timer = 0; 2235 lq_sta->flush_timer = 0;
2236 lq_sta->supp_rates = sta->supp_rates[sband->band]; 2236 lq_sta->supp_rates = sta->sta.supp_rates[sband->band];
2237 sta->txrate_idx = 3; 2237 sta->txrate_idx = 3;
2238 for (j = 0; j < LQ_SIZE; j++) 2238 for (j = 0; j < LQ_SIZE; j++)
2239 for (i = 0; i < IWL_RATE_COUNT; i++) 2239 for (i = 0; i < IWL_RATE_COUNT; i++)
@@ -2270,7 +2270,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
2270 2270
2271 /* Find highest tx rate supported by hardware and destination station */ 2271 /* Find highest tx rate supported by hardware and destination station */
2272 for (i = 0; i < sband->n_bitrates; i++) 2272 for (i = 0; i < sband->n_bitrates; i++)
2273 if (sta->supp_rates[sband->band] & BIT(i)) 2273 if (sta->sta.supp_rates[sband->band] & BIT(i))
2274 sta->txrate_idx = i; 2274 sta->txrate_idx = i;
2275 2275
2276 lq_sta->last_txrate_idx = sta->txrate_idx; 2276 lq_sta->last_txrate_idx = sta->txrate_idx;
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5a6a029da4d..ef8e4cc32c2 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -666,10 +666,12 @@ enum set_key_cmd {
666 * 666 *
667 * @addr: MAC address 667 * @addr: MAC address
668 * @aid: AID we assigned to the station if we're an AP 668 * @aid: AID we assigned to the station if we're an AP
669 * @supp_rates: Bitmap of supported rates (per band)
669 * @drv_priv: data area for driver use, will always be aligned to 670 * @drv_priv: data area for driver use, will always be aligned to
670 * sizeof(void *), size is determined in hw information. 671 * sizeof(void *), size is determined in hw information.
671 */ 672 */
672struct ieee80211_sta { 673struct ieee80211_sta {
674 u64 supp_rates[IEEE80211_NUM_BANDS];
673 u8 addr[ETH_ALEN]; 675 u8 addr[ETH_ALEN];
674 u16 aid; 676 u16 aid;
675 677
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index ed5e77ce627..47988d2eb15 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -667,7 +667,7 @@ static void sta_apply_parameters(struct ieee80211_local *local,
667 rates |= BIT(j); 667 rates |= BIT(j);
668 } 668 }
669 } 669 }
670 sta->supp_rates[local->oper_channel->band] = rates; 670 sta->sta.supp_rates[local->oper_channel->band] = rates;
671 } 671 }
672 672
673 if (params->ht_capa) { 673 if (params->ht_capa) {
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index debf7834dbc..faac101c0f8 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -106,7 +106,7 @@ static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata,
106 return NULL; 106 return NULL;
107 107
108 sta->flags = WLAN_STA_AUTHORIZED; 108 sta->flags = WLAN_STA_AUTHORIZED;
109 sta->supp_rates[local->hw.conf.channel->band] = rates; 109 sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
110 110
111 return sta; 111 return sta;
112} 112}
@@ -243,7 +243,7 @@ void mesh_neighbour_update(u8 *hw_addr, u64 rates, struct ieee80211_sub_if_data
243 } 243 }
244 244
245 sta->last_rx = jiffies; 245 sta->last_rx = jiffies;
246 sta->supp_rates[local->hw.conf.channel->band] = rates; 246 sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
247 if (peer_accepting_plinks && sta->plink_state == PLINK_LISTEN && 247 if (peer_accepting_plinks && sta->plink_state == PLINK_LISTEN &&
248 sdata->u.mesh.accepting_plinks && 248 sdata->u.mesh.accepting_plinks &&
249 sdata->u.mesh.mshcfg.auto_open_plinks) 249 sdata->u.mesh.mshcfg.auto_open_plinks)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 35c421b89dd..c049f336e58 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1301,7 +1301,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
1301 } 1301 }
1302 } 1302 }
1303 1303
1304 sta->supp_rates[local->hw.conf.channel->band] = rates; 1304 sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
1305 sdata->bss_conf.basic_rates = basic_rates; 1305 sdata->bss_conf.basic_rates = basic_rates;
1306 1306
1307 /* cf. IEEE 802.11 9.2.12 */ 1307 /* cf. IEEE 802.11 9.2.12 */
@@ -1497,13 +1497,13 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
1497 if (sta) { 1497 if (sta) {
1498 u64 prev_rates; 1498 u64 prev_rates;
1499 1499
1500 prev_rates = sta->supp_rates[band]; 1500 prev_rates = sta->sta.supp_rates[band];
1501 /* make sure mandatory rates are always added */ 1501 /* make sure mandatory rates are always added */
1502 sta->supp_rates[band] = supp_rates | 1502 sta->sta.supp_rates[band] = supp_rates |
1503 ieee80211_mandatory_rates(local, band); 1503 ieee80211_mandatory_rates(local, band);
1504 1504
1505#ifdef CONFIG_MAC80211_IBSS_DEBUG 1505#ifdef CONFIG_MAC80211_IBSS_DEBUG
1506 if (sta->supp_rates[band] != prev_rates) 1506 if (sta->sta.supp_rates[band] != prev_rates)
1507 printk(KERN_DEBUG "%s: updated supp_rates set " 1507 printk(KERN_DEBUG "%s: updated supp_rates set "
1508 "for %s based on beacon info (0x%llx | " 1508 "for %s based on beacon info (0x%llx | "
1509 "0x%llx -> 0x%llx)\n", 1509 "0x%llx -> 0x%llx)\n",
@@ -1511,7 +1511,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
1511 print_mac(mac, sta->sta.addr), 1511 print_mac(mac, sta->sta.addr),
1512 (unsigned long long) prev_rates, 1512 (unsigned long long) prev_rates,
1513 (unsigned long long) supp_rates, 1513 (unsigned long long) supp_rates,
1514 (unsigned long long) sta->supp_rates[band]); 1514 (unsigned long long) sta->sta.supp_rates[band]);
1515#endif 1515#endif
1516 } else { 1516 } else {
1517 ieee80211_ibss_add_sta(sdata, NULL, mgmt->bssid, 1517 ieee80211_ibss_add_sta(sdata, NULL, mgmt->bssid,
@@ -2339,7 +2339,7 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
2339 set_sta_flags(sta, WLAN_STA_AUTHORIZED); 2339 set_sta_flags(sta, WLAN_STA_AUTHORIZED);
2340 2340
2341 /* make sure mandatory rates are always added */ 2341 /* make sure mandatory rates are always added */
2342 sta->supp_rates[band] = supp_rates | 2342 sta->sta.supp_rates[band] = supp_rates |
2343 ieee80211_mandatory_rates(local, band); 2343 ieee80211_mandatory_rates(local, band);
2344 2344
2345 rate_control_rate_init(sta, local); 2345 rate_control_rate_init(sta, local);
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h
index ede7ab56f65..5f18c27eb90 100644
--- a/net/mac80211/rate.h
+++ b/net/mac80211/rate.h
@@ -134,7 +134,7 @@ static inline int rate_supported(struct sta_info *sta,
134 enum ieee80211_band band, 134 enum ieee80211_band band,
135 int index) 135 int index)
136{ 136{
137 return (sta == NULL || sta->supp_rates[band] & BIT(index)); 137 return (sta == NULL || sta->sta.supp_rates[band] & BIT(index));
138} 138}
139 139
140static inline s8 140static inline s8
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index df42d181545..4dafa044b2f 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -168,7 +168,6 @@ struct sta_ampdu_mlme {
168 * in the header file. 168 * in the header file.
169 * @flaglock: spinlock for flags accesses 169 * @flaglock: spinlock for flags accesses
170 * @ht_info: HT capabilities of this STA 170 * @ht_info: HT capabilities of this STA
171 * @supp_rates: Bitmap of supported rates (per band)
172 * @addr: MAC address of this STA 171 * @addr: MAC address of this STA
173 * @aid: STA's unique AID (1..2007, 0 = not assigned yet), 172 * @aid: STA's unique AID (1..2007, 0 = not assigned yet),
174 * only used in AP (and IBSS?) mode 173 * only used in AP (and IBSS?) mode
@@ -228,7 +227,6 @@ struct sta_info {
228 spinlock_t lock; 227 spinlock_t lock;
229 spinlock_t flaglock; 228 spinlock_t flaglock;
230 struct ieee80211_ht_info ht_info; 229 struct ieee80211_ht_info ht_info;
231 u64 supp_rates[IEEE80211_NUM_BANDS];
232 230
233 u16 listen_interval; 231 u16 listen_interval;
234 232