wl12xx: add channel field to wlvif
add channel into the per-interface data.
mac80211 configures some values (e.g. band, channel)
globally, while we configure them per-interface.
In order to make it easier to keep track of the
configured value for each value while keeping sync
with mac80211, save these values both globally
and per-vif.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 8e395f1..5137275 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1973,6 +1973,7 @@
* per-interface. thus, on init, we have to copy them from wl
*/
wlvif->band = wl->band;
+ wlvif->channel = wl->channel;
INIT_WORK(&wlvif->rx_streaming_enable_work,
wl1271_rx_streaming_enable_work);
@@ -2458,12 +2459,13 @@
/* if the channel changes while joined, join again */
if (changed & IEEE80211_CONF_CHANGE_CHANNEL &&
((wlvif->band != conf->channel->band) ||
- (wl->channel != channel))) {
+ (wlvif->channel != channel))) {
/* send all pending packets */
wl1271_tx_work_locked(wl);
wl->band = conf->channel->band;
- wlvif->band = conf->channel->band;
wl->channel = channel;
+ wlvif->band = conf->channel->band;
+ wlvif->channel = channel;
if (!is_ap) {
/*