ath9k: Fix regression in channelwidth switch at the same channel
commitc9bc8b31648585fa3c985f6ac52a07a1d85f0e4a
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Mon, 9 Jan 2012 10:07:53 +0000 (9 15:37 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Jan 2012 00:13:23 +0000 (25 16:13 -0800)
tree6c510c4ecea1612f1664c909d1fd90af97a64b62
parent62b2e1674ef4976f5a6535071dcd76071c571cb6
ath9k: Fix regression in channelwidth switch at the same channel

commit 1a19f77f3642b8194ad9cf55548cc5d92e841766 upstream.

The commit "ath9k: Fix invalid noisefloor reading due to channel update"
preserves the current channel noisefloor readings before updating
channel type at the same channel index. It is also updating the curchan
pointer. As survey updation is also referring curchan pointer to fetch
the appropriate index, which might leads to invalid memory access. This
patch partially reverts the change and stores the noise floor history
buffer before updating channel type w/o updating curchan.

Cc: Gary Morain <gmorain@google.com>
Cc: Paul Stewart <pstew@google.com>
Reported-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath9k/calib.c
drivers/net/wireless/ath/ath9k/main.c