Search Linux Wireless

Re: carl9170: monitor mode hangs due to channel changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Wednesday, March 20, 2013 09:50:13 PM Marco Fonseca wrote:
> I'm seeing a problem with the carl driver. If I change channels
> repeatedly on the 2.4ghz band, monitoring (e.g. tcpdump) will
> eventually halt.  I've seen this on various versions of the carl
> driver/firmware (both from 1.9.4 to 1.9.7)
thanks for reporting this. You could try either of the attached
patch and test if it alleviate the issue. If the patches do help
then the problem is caused by rf/phy (code) [which is a problem
since the rf/phy parts are taken from the vendor driver as we
have no docs or specs for it].

Regards,
	Chr
--

Patch 1: just reinitialize AGC_CONTROL
(can also be moved behind CMD_FREQ_START)
---
diff --git a/drivers/net/wireless/ath/carl9170/phy.c b/drivers/net/wireless/ath/carl9170/phy.c
index b72c09c..7fffee6 100644
--- a/drivers/net/wireless/ath/carl9170/phy.c
+++ b/drivers/net/wireless/ath/carl9170/phy.c
@@ -1638,6 +1638,13 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel,
 		cmd = CARL9170_CMD_FREQUENCY;
 	}
 
+	err = carl9170_write_reg(ar, AR9170_PHY_REG_AGC_CONTROL,
+		carl9170_def_val(AR9170_PHY_REG_AGC_CONTROL,
+				 channel->band == IEEE80211_BAND_2GHZ,
+				 conf_is_ht40(&ar->hw->conf)));
+	if (err)
+		return err;
+
 	err = carl9170_exec_cmd(ar, CARL9170_CMD_FREQ_START, 0, NULL, 0, NULL);
 	if (err)
 		return err;
---


Patch 2: always do warm reset when changing channels
---
diff --git a/drivers/net/wireless/ath/carl9170/phy.c b/drivers/net/wireless/ath/carl9170/phy.c
index b72c09c..643cc57 100644
--- a/drivers/net/wireless/ath/carl9170/phy.c
+++ b/drivers/net/wireless/ath/carl9170/phy.c
@@ -1578,7 +1578,7 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel,
 	u32 cmd, tmp, offs = 0, new_ht = 0;
 	int err;
 	enum carl9170_bw bw;
-	bool warm_reset;
+	bool warm_reset = true;
 	struct ieee80211_channel *old_channel = NULL;
 
 	bw = nl80211_to_carl(_bw);
@@ -1592,14 +1592,7 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel,
 	/* may be NULL at first setup */
 	if (ar->channel) {
 		old_channel = ar->channel;
-		warm_reset = (old_channel->band != channel->band) ||
-			     (old_channel->center_freq ==
-			      channel->center_freq) ||
-			     (ar->ht_settings != new_ht);
-
 		ar->channel = NULL;
-	} else {
-		warm_reset = true;
 	}
 
 	/* HW workaround */
---
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux