diff options
author | David S. Miller <davem@davemloft.net> | 2009-08-14 12:27:19 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-14 12:27:19 -0700 |
commit | 88512935a24305fea7aecc9ba4d675869e97fc2a (patch) | |
tree | 8bce14ba3d119719bf2d8865fa366384fd45af34 /drivers/net | |
parent | 8a62babfb87aa5911e87e0ce38381bdfdc4a2b83 (diff) | |
parent | 6b26dead3ce97d016b57724b01974d5ca5c84bd5 (diff) | |
download | linux-88512935a24305fea7aecc9ba4d675869e97fc2a.tar.bz2 |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers/net')
-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; } /* |