summaryrefslogtreecommitdiffstats
path: root/net/mac80211/wext.c
diff options
context:
space:
mode:
authorJohannes Berg2008-10-21 12:40:02 +0200
committerJohn W. Linville2008-11-01 00:00:23 +0100
commite6a9854b05c1a6af1308fe2b8c68f35abf28a3ee (patch)
tree241f611f8194586ccabf61bacb060508773b9d05 /net/mac80211/wext.c
parentmac80211: add might_sleep to hw_config (diff)
downloadkernel-qcow2-linux-e6a9854b05c1a6af1308fe2b8c68f35abf28a3ee.tar.gz
kernel-qcow2-linux-e6a9854b05c1a6af1308fe2b8c68f35abf28a3ee.tar.xz
kernel-qcow2-linux-e6a9854b05c1a6af1308fe2b8c68f35abf28a3ee.zip
mac80211/drivers: rewrite the rate control API
So after the previous changes we were still unhappy with how convoluted the API is and decided to make things simpler for everybody. This completely changes the rate control API, now taking into account 802.11n with MCS rates and more control, most drivers don't support that though. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r--net/mac80211/wext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index f7e442f80a17..31d2e74a1bc0 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -636,8 +636,8 @@ static int ieee80211_ioctl_giwrate(struct net_device *dev,
sta = sta_info_get(local, sdata->u.sta.bssid);
- if (sta && sta->last_txrate_idx < sband->n_bitrates)
- rate->value = sband->bitrates[sta->last_txrate_idx].bitrate;
+ if (sta && !(sta->last_tx_rate.flags & IEEE80211_TX_RC_MCS))
+ rate->value = sband->bitrates[sta->last_tx_rate.idx].bitrate;
else
rate->value = 0;