staging: vt6656: vnt_tx_packet don't change power when off channel.
authorMalcolm Priestley <tvboxspy@gmail.com>
Sat, 5 Jul 2014 18:24:23 +0000 (19:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2014 23:03:57 +0000 (16:03 -0700)
The changing channel is so fast when off channel that changing power is pointless.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/rxtx.c

index e896dfe5d3fcfe06a4b7e7ee776d15c3967cbd66..95b6cf307af6f94892481fd4eca8050843c8610e 100644 (file)
@@ -900,7 +900,8 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
        rate = ieee80211_get_tx_rate(priv->hw, info);
 
        current_rate = rate->hw_value;
-       if (priv->wCurrentRate != current_rate) {
+       if (priv->wCurrentRate != current_rate &&
+                       !(priv->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) {
                priv->wCurrentRate = current_rate;
                bScheduleCommand(priv, WLAN_CMD_SETPOWER, NULL);
        }