ath10k: fix ar->rx_channel updating logic
authorMichal Kazior <michal.kazior@tieto.com>
Wed, 3 Jun 2015 10:16:54 +0000 (12:16 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 9 Jun 2015 10:46:47 +0000 (13:46 +0300)
commitd7bf4b4aba056f3e7eb88a3d8d45ee1a6f4873e9
treedc7085497d3dbf2a02cafc16e1d5b6165f212ee7
parentb72436c4306dfea73c39b1d5f63830d9d03b746f
ath10k: fix ar->rx_channel updating logic

Channel contexts aren't iterable until after
they've been added to the driver. The code assumed
otherwise.

This problem could result in:

 * rx_channel being NULL and forcing Rx path to go
   the slow way to get channel on QCA988X,

 * report incorrect channel when running
   multi-channel on QCA61X4 hw2.1,

 * report incorrect channel after AP channel
   switch.

Fixes: 500ff9f9389d ("ath10k: implement chanctx API")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c