From: Eliad Peller Date: Thu, 15 Sep 2011 10:00:01 +0000 (+0300) Subject: wl12xx: send all pending packets on channel change X-Git-Tag: MMI-PSA29.97-13-9~18194^2~183^2~38^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c6930b07b3d0a8c529e1d9287bd5994319cf447d;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git wl12xx: send all pending packets on channel change There is a race condition between wl1271_tx_work() and the channel switch, so make sure all the pending packets are being sent before switching channel. Signed-off-by: Eliad Peller Signed-off-by: Luciano Coelho --- diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index a8728ae2bb02..62118b7988bd 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -2355,6 +2355,8 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed) if (changed & IEEE80211_CONF_CHANGE_CHANNEL && ((wl->band != conf->channel->band) || (wl->channel != channel))) { + /* send all pending packets */ + wl1271_tx_work_locked(wl); wl->band = conf->channel->band; wl->channel = channel;