aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2008-09-14 20:09:39 +0200
committerLuis R. Rodriguez <lrodriguez@atheros.com>2008-09-15 09:44:48 -0700
commitc99fad0193ece4609f8eb215a8d31295e3816760 (patch)
treef6f11ff37f397ecc2684452bc227da9856f9b779
parent9964227ce20ccc4b7aa261a2a5f6b73c5abd2226 (diff)
downloadcompat-wireless-2.6-old-c99fad0193ece4609f8eb215a8d31295e3816760.tar.gz
Backport: mac80211: share sta->supp_rates
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-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.c14
-rw-r--r--net/mac80211/rate.h2
-rw-r--r--net/mac80211/sta_info.h2
6 files changed, 13 insertions, 13 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index f112c33..f959397 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -672,10 +672,12 @@ enum set_key_cmd {
*
* @addr: MAC address
* @aid: AID we assigned to the station if we're an AP
+ * @supp_rates: Bitmap of supported rates (per band)
* @drv_priv: data area for driver use, will always be aligned to
* sizeof(void *), size is determined in hw information.
*/
struct ieee80211_sta {
+ u64 supp_rates[IEEE80211_NUM_BANDS];
u8 addr[ETH_ALEN];
u16 aid;
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 435fe96..43e766b 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -619,7 +619,7 @@ static void sta_apply_parameters(struct ieee80211_local *local,
rates |= BIT(j);
}
}
- sta->supp_rates[local->oper_channel->band] = rates;
+ sta->sta.supp_rates[local->oper_channel->band] = rates;
}
if (ieee80211_vif_is_mesh(&sdata->vif) && params->plink_action) {
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 8714e7e..ad37239 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,
return NULL;
sta->flags = WLAN_STA_AUTHORIZED;
- sta->supp_rates[local->hw.conf.channel->band] = rates;
+ sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
return sta;
}
@@ -244,7 +244,7 @@ void mesh_neighbour_update(u8 *hw_addr, u64 rates, struct net_device *dev,
}
sta->last_rx = jiffies;
- sta->supp_rates[local->hw.conf.channel->band] = rates;
+ sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
if (peer_accepting_plinks && sta->plink_state == PLINK_LISTEN &&
sdata->u.sta.accepting_plinks &&
sdata->u.sta.mshcfg.auto_open_plinks)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index df346d4..fb632a4 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2151,7 +2151,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
}
}
- sta->supp_rates[local->hw.conf.channel->band] = rates;
+ sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
sdata->basic_rates = basic_rates;
/* cf. IEEE 802.11 9.2.12 */
@@ -2594,13 +2594,13 @@ static void ieee80211_rx_bss_info(struct net_device *dev,
u64 supp_rates = ieee80211_sta_get_rates(local, elems,
rx_status->band);
- prev_rates = sta->supp_rates[rx_status->band];
- sta->supp_rates[rx_status->band] &= supp_rates;
- if (sta->supp_rates[rx_status->band] == 0) {
+ prev_rates = sta->sta.supp_rates[rx_status->band];
+ sta->sta.supp_rates[rx_status->band] &= supp_rates;
+ if (sta->sta.supp_rates[rx_status->band] == 0) {
/* No matching rates - this should not really happen.
* Make sure that at least one rate is marked
* supported to avoid issues with TX rate ctrl. */
- sta->supp_rates[rx_status->band] =
+ sta->sta.supp_rates[rx_status->band] =
sdata->u.sta.supp_rates_bits[rx_status->band];
}
}
@@ -4375,9 +4375,9 @@ struct sta_info *ieee80211_ibss_add_sta(struct net_device *dev,
set_sta_flags(sta, WLAN_STA_AUTHORIZED);
if (supp_rates)
- sta->supp_rates[band] = supp_rates;
+ sta->sta.supp_rates[band] = supp_rates;
else
- sta->supp_rates[band] = sdata->u.sta.supp_rates_bits[band];
+ sta->sta.supp_rates[band] = sdata->u.sta.supp_rates_bits[band];
rate_control_rate_init(sta, local);
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h
index ede7ab5..5f18c27 100644
--- a/net/mac80211/rate.h
+++ b/net/mac80211/rate.h
@@ -134,7 +134,7 @@ static inline int rate_supported(struct sta_info *sta,
enum ieee80211_band band,
int index)
{
- return (sta == NULL || sta->supp_rates[band] & BIT(index));
+ return (sta == NULL || sta->sta.supp_rates[band] & BIT(index));
}
static inline s8
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 888b799..d2d3698 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -168,7 +168,6 @@ struct sta_ampdu_mlme {
* in the header file.
* @flaglock: spinlock for flags accesses
* @ht_info: HT capabilities of this STA
- * @supp_rates: Bitmap of supported rates (per band)
* @addr: MAC address of this STA
* @aid: STA's unique AID (1..2007, 0 = not assigned yet),
* only used in AP (and IBSS?) mode
@@ -231,7 +230,6 @@ struct sta_info {
spinlock_t lock;
spinlock_t flaglock;
struct ieee80211_ht_info ht_info;
- u64 supp_rates[IEEE80211_NUM_BANDS];
u16 listen_interval;