]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mac80211: share sta_info->ht_info
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 11 Sep 2008 01:14:11 +0000 (03:14 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 15 Sep 2008 20:48:24 +0000 (16:48 -0400)
Rate control algorithms may need access to a station's
HT capabilities, so share the ht_info struct in the
public station API.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
include/net/mac80211.h
net/mac80211/cfg.c
net/mac80211/mlme.c
net/mac80211/sta_info.h

index a8711c314e6ac17224aab47a60aa7271baf97f89..f45a752e93c67e5ff93bcf475cd590cb93e14327 100644 (file)
@@ -1154,10 +1154,10 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv,
        s8 is_green = lq_sta->is_green;
 
        if (!(conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) ||
-           !sta->ht_info.ht_supported)
+           !sta->sta.ht_info.ht_supported)
                return -1;
 
-       if (((sta->ht_info.cap & IEEE80211_HT_CAP_SM_PS) >> 2)
+       if (((sta->sta.ht_info.cap & IEEE80211_HT_CAP_SM_PS) >> 2)
                                                == WLAN_HT_CAP_SM_PS_STATIC)
                return -1;
 
@@ -1222,7 +1222,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
        s32 rate;
 
        if (!(conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) ||
-           !sta->ht_info.ht_supported)
+           !sta->sta.ht_info.ht_supported)
                return -1;
 
        IWL_DEBUG_RATE("LQ: try to switch to SISO\n");
index ef8e4cc32c2ede23cae5dc90fff97c33f65fb795..d6669fd3ffa898eef69754cbb665a610fc35d31b 100644 (file)
@@ -667,6 +667,7 @@ 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)
+ * @ht_info: HT capabilities of this STA
  * @drv_priv: data area for driver use, will always be aligned to
  *     sizeof(void *), size is determined in hw information.
  */
@@ -674,6 +675,7 @@ struct ieee80211_sta {
        u64 supp_rates[IEEE80211_NUM_BANDS];
        u8 addr[ETH_ALEN];
        u16 aid;
+       struct ieee80211_ht_info ht_info;
 
        /* must be last */
        u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *))));
index 47988d2eb15c8b13889c8fb1b8bd93e1c9b72b5c..e2574885db4aba5414aa82722ca9deaffab04275 100644 (file)
@@ -672,7 +672,7 @@ static void sta_apply_parameters(struct ieee80211_local *local,
 
        if (params->ht_capa) {
                ieee80211_ht_cap_ie_to_ht_info(params->ht_capa,
-                                              &sta->ht_info);
+                                              &sta->sta.ht_info);
        }
 
        if (ieee80211_vif_is_mesh(&sdata->vif) && params->plink_action) {
index c049f336e58a3680b2923a741900bdc2b24fda73..8611a8318c9c3d9b2b2e66a5237543a1123574e3 100644 (file)
@@ -1316,11 +1316,11 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
                struct ieee80211_ht_bss_info bss_info;
                ieee80211_ht_cap_ie_to_ht_info(
                                (struct ieee80211_ht_cap *)
-                               elems.ht_cap_elem, &sta->ht_info);
+                               elems.ht_cap_elem, &sta->sta.ht_info);
                ieee80211_ht_addt_info_ie_to_ht_bss_info(
                                (struct ieee80211_ht_addt_info *)
                                elems.ht_info_elem, &bss_info);
-               ieee80211_handle_ht(local, 1, &sta->ht_info, &bss_info);
+               ieee80211_handle_ht(local, 1, &sta->sta.ht_info, &bss_info);
        }
 
        rate_control_rate_init(sta, local);
index 5d8fabf7a68ba90f4de12bb392e47353bdafba18..b773c7b8d2969d0d5286d4d35078457af7119d69 100644 (file)
@@ -167,7 +167,6 @@ struct sta_ampdu_mlme {
  * @lock: used for locking all fields that require locking, see comments
  *     in the header file.
  * @flaglock: spinlock for flags accesses
- * @ht_info: HT capabilities of this STA
  * @addr: MAC address of this STA
  * @aid: STA's unique AID (1..2007, 0 = not assigned yet),
  *     only used in AP (and IBSS?) mode
@@ -226,7 +225,6 @@ struct sta_info {
        void *rate_ctrl_priv;
        spinlock_t lock;
        spinlock_t flaglock;
-       struct ieee80211_ht_info ht_info;
 
        u16 listen_interval;