diff options
author | David S. Miller <davem@davemloft.net> | 2009-08-14 15:27:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-14 15:27:19 -0400 |
commit | 88512935a24305fea7aecc9ba4d675869e97fc2a (patch) | |
tree | 8bce14ba3d119719bf2d8865fa366384fd45af34 /drivers | |
parent | 8a62babfb87aa5911e87e0ce38381bdfdc4a2b83 (diff) | |
parent | 6b26dead3ce97d016b57724b01974d5ca5c84bd5 (diff) |
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 { | |||
849 | static inline void rt2x00_rf_read(struct rt2x00_dev *rt2x00dev, | 849 | static inline void rt2x00_rf_read(struct rt2x00_dev *rt2x00dev, |
850 | const unsigned int word, u32 *data) | 850 | const unsigned int word, u32 *data) |
851 | { | 851 | { |
852 | *data = rt2x00dev->rf[word]; | 852 | BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); |
853 | *data = rt2x00dev->rf[word - 1]; | ||
853 | } | 854 | } |
854 | 855 | ||
855 | static inline void rt2x00_rf_write(struct rt2x00_dev *rt2x00dev, | 856 | static inline void rt2x00_rf_write(struct rt2x00_dev *rt2x00dev, |
856 | const unsigned int word, u32 data) | 857 | const unsigned int word, u32 data) |
857 | { | 858 | { |
858 | rt2x00dev->rf[word] = data; | 859 | BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); |
860 | rt2x00dev->rf[word - 1] = data; | ||
859 | } | 861 | } |
860 | 862 | ||
861 | /* | 863 | /* |