]> git.karo-electronics.de Git - mv-sheeva.git/commit
mwl8k: fix UPDATE_STADB command struct legacy_rates array length
authorLennert Buytenhek <buytenh@wantstofly.org>
Mon, 30 Nov 2009 17:11:44 +0000 (18:11 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Dec 2009 21:51:19 +0000 (16:51 -0500)
commit140eb5e2c1978622d7cd979d59a1c0586fe3bbdb
tree9e43ece949bc8f421ef863d2e9223c2198275613
parent0b5351a8e86292dfac1ca1451deaadb416a33cb8
mwl8k: fix UPDATE_STADB command struct legacy_rates array length

There exist 12 802.11b/g rates, but mwl8k supports two additional
(non-standard) rates, and includes those rates in rate bitmasks and
in its internal rate table that hardware rate indices index.

Commit "mwl8k: report rate and other information for received frames"
added one of the nonstandard rates to the mwl8k_rates table to make
the OFDM rates in the table line up with the rate indices that are
reported in the receive descriptor (so that we can just simply copy
the receive descriptor rate index into ieee80211_rx_status::rate_idx)
and bumped MWL8K_IEEE_LEGACY_DATA_RATES from 12 to 13, but this
screwed up the UPDATE_STADB command struct layout, as it also uses
that define, for its legacy_rates array.

To avoid having to convert rate indices and legacy rate bitmaps (e.g.
ieee80211_bss_conf::basic_rates) between the 12-rate mac80211 format
and the 14-rate mwl8k format, we'll report all 14 rates in our wiphy's
band, but filter out the nonstandard ones e.g. in the case of the
UPDATE_STADB command which only accepts 12 rates.

In the commands that accept 14 rates (SET_AID, SET_RATE), replace the
use of the MWL8K_RATE_INDEX_MAX_ARRAY define in the command struct by
the constant 14, to make it clearer that these commands accept 14 rates.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwl8k.c