浏览代码

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 <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller 14 年之前
父节点
当前提交
c6930b07b3
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/net/wireless/wl12xx/main.c

+ 2 - 0
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;