diff options
author | David S. Miller <davem@davemloft.net> | 2009-08-14 21:27:19 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-14 21:27:19 +0200 |
commit | 88512935a24305fea7aecc9ba4d675869e97fc2a (patch) | |
tree | 8bce14ba3d119719bf2d8865fa366384fd45af34 /drivers | |
parent | ixgbe: Fix receive on real device when VLANs are configured (diff) | |
parent | rt2x00: fix memory corruption in rf cache, add a sanity check (diff) | |
download | linux-88512935a24305fea7aecc9ba4d675869e97fc2a.tar.xz linux-88512935a24305fea7aecc9ba4d675869e97fc2a.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index a498dde024e1..49c9e2c1433d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h @@ -849,13 +849,15 @@ struct rt2x00_dev { static inline void rt2x00_rf_read(struct rt2x00_dev *rt2x00dev, const unsigned int word, u32 *data) { - *data = rt2x00dev->rf[word]; + BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); + *data = rt2x00dev->rf[word - 1]; } static inline void rt2x00_rf_write(struct rt2x00_dev *rt2x00dev, const unsigned int word, u32 data) { - rt2x00dev->rf[word] = data; + BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); + rt2x00dev->rf[word - 1] = data; } /* |