]> git.baikalelectronics.ru Git - kernel.git/commit
mwifiex: fix incomplete scan in case of IE parsing error
authorBing Zhao <bzhao@marvell.com>
Tue, 29 Jan 2013 22:38:02 +0000 (14:38 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 30 Jan 2013 19:13:09 +0000 (14:13 -0500)
commit891cc9a9ff6b9f5e9f70a54dcb0d344a267291f5
tree8b557716ce3090acd8b152d92d56bdb026ea5151
parentb4c6e199df0079b67316f47efefab1a12f708c9d
mwifiex: fix incomplete scan in case of IE parsing error

A scan request is split into multiple scan commands queued in
scan_pending_q. Each scan command will be sent to firmware and
its response is handlded one after another.

If any error is detected while parsing IE in command response
buffer the remaining data will be ignored and error is returned.

We should check if there is any more scan commands pending in
the queue before returning error. This ensures that we will call
cfg80211_scan_done if this is the last scan command, or send
next scan command in scan_pending_q to firmware.

Cc: "3.6+" <stable@vger.kernel.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/scan.c