athk6l: Fix channel list processing in scan requests
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 2 Sep 2011 17:07:06 +0000 (20:07 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 5 Sep 2011 08:26:47 +0000 (11:26 +0300)
commit11869befc7285be712623536daa30791aec1682f
treeac0f915675906d5eb88f43f9a0baa3b845c5cae4
parent252c068b9fba57493940af344b6d92ee3c278941
athk6l: Fix channel list processing in scan requests

Limit the length of the channel list to WMI_MAX_CHANNELS to avoid
rejection of the request in wmi.c. Since there is not really much
point in using a specific list of more than 32 channels, drop the
channel list if more channels are specified and scan all channels.

Fix cfg80211 scan API use: ar->scan_req must be set only if returning
success from scan() handler. The previous version would result in use
of freed memory and likely kernel panic should the scan request fail
to be sent to the target.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/cfg80211.c