]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
wlcore: support peer MIMO rates
authorArik Nemtsov <arik@wizery.com>
Thu, 10 May 2012 09:13:33 +0000 (12:13 +0300)
committerLuciano Coelho <coelho@ti.com>
Tue, 5 Jun 2012 12:55:40 +0000 (15:55 +0300)
Parse the peer ht_cap element containing MCS8-MCS15 rates and pass it
to the FW. Rates unsupported by the HW will be sanitized by mac80211
before reaching us.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wlcore/cmd.c
drivers/net/wireless/ti/wlcore/main.c
drivers/net/wireless/ti/wlcore/tx.c
drivers/net/wireless/ti/wlcore/wl12xx.h

index 8450f0eecc9b00270c8723b1dc9785b84d49bad3..0dec46586ad59ed135df5a6c2d35d5cd08c2ef32 100644 (file)
@@ -1371,7 +1371,9 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
        sta_rates = sta->supp_rates[wlvif->band];
        if (sta->ht_cap.ht_supported)
-               sta_rates |= sta->ht_cap.mcs.rx_mask[0] << HW_HT_RATES_OFFSET;
+               sta_rates |=
+                       (sta->ht_cap.mcs.rx_mask[0] << HW_HT_RATES_OFFSET) |
+                       (sta->ht_cap.mcs.rx_mask[1] << HW_MIMO_RATES_OFFSET);
 
        cmd->supported_rates =
                cpu_to_le32(wl1271_tx_enabled_rates_get(wl, sta_rates,
index 6f0361b2361140a559321719a6f455cab339bec3..47dfc9d1295c7564a2c19109ed052d5abfcdcd14 100644 (file)
@@ -3696,7 +3696,8 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
                sta_rate_set = sta->supp_rates[wl->hw->conf.channel->band];
                if (sta->ht_cap.ht_supported)
                        sta_rate_set |=
-                           (sta->ht_cap.mcs.rx_mask[0] << HW_HT_RATES_OFFSET);
+                         (sta->ht_cap.mcs.rx_mask[0] << HW_HT_RATES_OFFSET) |
+                         (sta->ht_cap.mcs.rx_mask[1] << HW_MIMO_RATES_OFFSET);
                sta_ht_cap = sta->ht_cap;
                sta_exists = true;
 
index 44e4e7bb29bd2f8adfb2f9b5cbf42ca55f2d9732..200d091db6f950a7d10d95f594056cfba80a445d 100644 (file)
@@ -428,10 +428,10 @@ u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set,
                rate_set >>= 1;
        }
 
-       /* MCS rates indication are on bits 16 - 23 */
+       /* MCS rates indication are on bits 16 - 31 */
        rate_set >>= HW_HT_RATES_OFFSET - band->n_bitrates;
 
-       for (bit = 0; bit < 8; bit++) {
+       for (bit = 0; bit < 16; bit++) {
                if (rate_set & 0x1)
                        enabled_rates |= (CONF_HW_BIT_RATE_MCS_0 << bit);
                rate_set >>= 1;
index 05e6f74e4d25d856c24ae8ac80df5ee8d8b307ce..571a4ef34a3221407c8ec4351da4bc42eeddea2f 100644 (file)
@@ -502,6 +502,7 @@ void wl1271_rx_filter_flatten_fields(struct wl12xx_rx_filter *filter,
 /* Macros to handle wl1271.sta_rate_set */
 #define HW_BG_RATES_MASK       0xffff
 #define HW_HT_RATES_OFFSET     16
+#define HW_MIMO_RATES_OFFSET   24
 
 #define WL12XX_HW_BLOCK_SIZE   256