mwifiex: update config_bands during infra association
authorAmitkumar Karwar <akarwar@marvell.com>
Wed, 9 Jan 2013 01:53:10 +0000 (17:53 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 11 Jan 2013 19:12:00 +0000 (14:12 -0500)
commitd7b9c5204e9c6810a20d509ee47bc70419096e59
tree64b67855e82ec1f9727d3c223e8fb64daee4d0ec
parentb7e98b5100aad9290d7f06fcb9d1e80f7f62f05f
mwifiex: update config_bands during infra association

Currently "adapter->config_bands" is updated during infra
association only if channel is provided by user in "iw connect"
command. config_bands is used while preparing association
request to calculate supported rates by intersecting our rates
with the rates advertised by AP.

There is corner case in which we include zero rates in
supported rates TLV based on previous IBSS network history,
which leads to association failure.

This patch fixes the problem by correctly updating config_bands.

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