802.11: clean up/fix HT support
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-agn-rs.c
index e2a58e477036e611da5ffc78abeda5748f7392ce..cd1bff590491dd0fb5179506c24136144421d9bc 100644 (file)
@@ -357,11 +357,9 @@ static void rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
                                      struct iwl_lq_sta *lq_data, u8 tid,
                                      struct ieee80211_sta *sta)
 {
-       DECLARE_MAC_BUF(mac);
-
        if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) {
-               IWL_DEBUG_HT("Starting Tx agg: STA: %s tid: %d\n",
-                               print_mac(mac, sta->addr), tid);
+               IWL_DEBUG_HT("Starting Tx agg: STA: %pM tid: %d\n",
+                               sta->addr, tid);
                ieee80211_start_tx_ba_session(priv->hw, sta->addr, tid);
        }
 }
@@ -1136,10 +1134,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->ht_cap.ht_supported)
                return -1;
 
-       if (((sta->ht_info.cap & IEEE80211_HT_CAP_SM_PS) >> 2)
+       if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2)
                                                == WLAN_HT_CAP_SM_PS_STATIC)
                return -1;
 
@@ -1204,7 +1202,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->ht_cap.ht_supported)
                return -1;
 
        IWL_DEBUG_RATE("LQ: try to switch to SISO\n");
@@ -2132,11 +2130,10 @@ static void rs_get_rate(void *priv_r, struct ieee80211_supported_band *sband,
        if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
            !lq_sta->ibss_sta_added) {
                u8 sta_id = iwl_find_station(priv, hdr->addr1);
-               DECLARE_MAC_BUF(mac);
 
                if (sta_id == IWL_INVALID_STATION) {
-                       IWL_DEBUG_RATE("LQ: ADD station %s\n",
-                                      print_mac(mac, hdr->addr1));
+                       IWL_DEBUG_RATE("LQ: ADD station %pM\n",
+                                      hdr->addr1);
                        sta_id = iwl_add_station_flags(priv, hdr->addr1,
                                                        0, CMD_ASYNC, NULL);
                }
@@ -2205,15 +2202,12 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
        lq_sta->ibss_sta_added = 0;
        if (priv->iw_mode == NL80211_IFTYPE_AP) {
                u8 sta_id = iwl_find_station(priv, sta->addr);
-               DECLARE_MAC_BUF(mac);
 
                /* for IBSS the call are from tasklet */
-               IWL_DEBUG_RATE("LQ: ADD station %s\n",
-                            print_mac(mac, sta->addr));
+               IWL_DEBUG_RATE("LQ: ADD station %pM\n", sta->addr);
 
                if (sta_id == IWL_INVALID_STATION) {
-                       IWL_DEBUG_RATE("LQ: ADD station %s\n",
-                                      print_mac(mac, sta->addr));
+                       IWL_DEBUG_RATE("LQ: ADD station %pM\n", sta->addr);
                        sta_id = iwl_add_station_flags(priv, sta->addr,
                                                        0, CMD_ASYNC, NULL);
                }
@@ -2244,19 +2238,19 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
         * active_siso_rate mask includes 9 MBits (bit 5), and CCK (bits 0-3),
         * supp_rates[] does not; shift to convert format, force 9 MBits off.
         */
-       lq_sta->active_siso_rate = conf->ht_conf.supp_mcs_set[0] << 1;
-       lq_sta->active_siso_rate |= conf->ht_conf.supp_mcs_set[0] & 0x1;
+       lq_sta->active_siso_rate = conf->ht_cap.mcs.rx_mask[0] << 1;
+       lq_sta->active_siso_rate |= conf->ht_cap.mcs.rx_mask[0] & 0x1;
        lq_sta->active_siso_rate &= ~((u16)0x2);
        lq_sta->active_siso_rate <<= IWL_FIRST_OFDM_RATE;
 
        /* Same here */
-       lq_sta->active_mimo2_rate = conf->ht_conf.supp_mcs_set[1] << 1;
-       lq_sta->active_mimo2_rate |= conf->ht_conf.supp_mcs_set[1] & 0x1;
+       lq_sta->active_mimo2_rate = conf->ht_cap.mcs.rx_mask[1] << 1;
+       lq_sta->active_mimo2_rate |= conf->ht_cap.mcs.rx_mask[1] & 0x1;
        lq_sta->active_mimo2_rate &= ~((u16)0x2);
        lq_sta->active_mimo2_rate <<= IWL_FIRST_OFDM_RATE;
 
-       lq_sta->active_mimo3_rate = conf->ht_conf.supp_mcs_set[2] << 1;
-       lq_sta->active_mimo3_rate |= conf->ht_conf.supp_mcs_set[2] & 0x1;
+       lq_sta->active_mimo3_rate = conf->ht_cap.mcs.rx_mask[2] << 1;
+       lq_sta->active_mimo3_rate |= conf->ht_cap.mcs.rx_mask[2] & 0x1;
        lq_sta->active_mimo3_rate &= ~((u16)0x2);
        lq_sta->active_mimo3_rate <<= IWL_FIRST_OFDM_RATE;
 
This page took 0.031095 seconds and 5 git commands to generate.