mwifiex: correct max IE length check for WPS IE
authorAvinash Patil <patila@marvell.com>
Tue, 23 Jul 2013 02:17:46 +0000 (19:17 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 24 Jul 2013 15:02:07 +0000 (11:02 -0400)
commit8795ca61e4ff3db70f2d072a28aaefc29f1a2301
tree526845a559226dd1f26e6e4ea4496d4220ce3404
parent5e4c07987f4db22cbc3e1dadb021baab0a34a57f
mwifiex: correct max IE length check for WPS IE

This patch is bug fix for an invalid boundry check for WPS IE.
We should check max IE length against defined macro; instead we were
checking it against size of pointer. Fix it.
Also move IE length check before allocation of memory.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/sta_ioctl.c