On 07-01-11 19:34 Andy Green wrote: > There doesn't seem to be an equivalent function in the vendor tree. > > Attached is my guess at what was intended.
Andy, thank you for finding this. Based on the current logic this is the right fix: Subject: [PATCH] zd1211rw: Fixed array size issue in reset_mode Andy Green found this issue. --- zd_mac.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/zd_mac.c b/zd_mac.c index 10339f5..7f0c3bc 100644 --- a/zd_mac.c +++ b/zd_mac.c @@ -157,7 +157,7 @@ void zd_mac_clear(struct zd_mac *mac) static int reset_mode(struct zd_mac *mac) { struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); - struct zd_ioreq32 ioreqs[3] = { + struct zd_ioreq32 ioreqs[] = { { CR_RX_FILTER, STA_RX_FILTER }, { CR_SNIFFER_ON, 0U }, }; @@ -165,10 +165,9 @@ static int reset_mode(struct zd_mac *mac if (ieee->iw_mode == IW_MODE_MONITOR) { ioreqs[0].value = 0xffffffff; ioreqs[1].value = 0x1; - ioreqs[2].value = ENC_SNIFFER; } - return zd_iowrite32a(&mac->chip, ioreqs, 3); + return zd_iowrite32a(&mac->chip, ioreqs, ARRAY_SIZE(ioreqs)); } int zd_mac_open(struct net_device *netdev) -- Uli Kunitz ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Zd1211-devs mailing list - http://zd1211.ath.cx/ Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs