diff options
author | Ulrich Kunitz <kune@deine-taler.de> | 2007-01-28 19:59:40 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-02-07 15:23:54 -0500 |
commit | fa8e29cff748efc7118c66b51f1241a927d86b98 (patch) | |
tree | cc65506d7ae6351a560840a95e8d2fcee47f1d0c /drivers/net/wireless/zd1211rw | |
parent | 6e3632f66110b144183d53d550a51cbbbabc178f (diff) |
[PATCH] zd1211rw: Fixed array size issue in reset_mode
Andy Green found this issue.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index a08524191b5d..1379c91a84a2 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -156,7 +156,7 @@ void zd_mac_clear(struct zd_mac *mac) | |||
156 | static int reset_mode(struct zd_mac *mac) | 156 | static int reset_mode(struct zd_mac *mac) |
157 | { | 157 | { |
158 | struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); | 158 | struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); |
159 | struct zd_ioreq32 ioreqs[3] = { | 159 | struct zd_ioreq32 ioreqs[] = { |
160 | { CR_RX_FILTER, STA_RX_FILTER }, | 160 | { CR_RX_FILTER, STA_RX_FILTER }, |
161 | { CR_SNIFFER_ON, 0U }, | 161 | { CR_SNIFFER_ON, 0U }, |
162 | }; | 162 | }; |
@@ -164,10 +164,9 @@ static int reset_mode(struct zd_mac *mac) | |||
164 | if (ieee->iw_mode == IW_MODE_MONITOR) { | 164 | if (ieee->iw_mode == IW_MODE_MONITOR) { |
165 | ioreqs[0].value = 0xffffffff; | 165 | ioreqs[0].value = 0xffffffff; |
166 | ioreqs[1].value = 0x1; | 166 | ioreqs[1].value = 0x1; |
167 | ioreqs[2].value = ENC_SNIFFER; | ||
168 | } | 167 | } |
169 | 168 | ||
170 | return zd_iowrite32a(&mac->chip, ioreqs, 3); | 169 | return zd_iowrite32a(&mac->chip, ioreqs, ARRAY_SIZE(ioreqs)); |
171 | } | 170 | } |
172 | 171 | ||
173 | int zd_mac_open(struct net_device *netdev) | 172 | int zd_mac_open(struct net_device *netdev) |