ath9k_htc: trigger spectral scan on set_channel
authorOleksij Rempel <linux@rempel-privat.de>
Thu, 6 Nov 2014 07:53:36 +0000 (08:53 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 11 Nov 2014 21:31:15 +0000 (16:31 -0500)
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/htc_drv_main.c

index 994fff1ff5198db245b3a3e2250105bfb6e6a8b9..689ac998b87e393830743c29671545f276747518 100644 (file)
@@ -314,6 +314,10 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,
        mod_timer(&priv->tx.cleanup_timer,
                  jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));
 
+       /* perform spectral scan if requested. */
+       if (test_bit(ATH_OP_SCANNING, &common->op_flags) &&
+                    priv->spec_priv.spectral_mode == SPECTRAL_CHANSCAN)
+               ath9k_cmn_spectral_scan_trigger(common, &priv->spec_priv);
 err:
        ath9k_htc_ps_restore(priv);
        return ret;