All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: linux-wireless@vger.kernel.org
Cc: Jake Edge <jake@lwn.net>, Johannes Berg <johannes@sipsolutions.net>
Subject: [RFT/RFC 5/4] iwlegacy: unblock queues on passive channel if any frame receive
Date: Sat, 25 May 2013 10:55:04 +0200	[thread overview]
Message-ID: <20130525085503.GC1599@redhat.com> (raw)
In-Reply-To: <1369311660-15378-5-git-send-email-sgruszka@redhat.com>

Currently we unblock queues (when blocked on passive channel) only if
beacon with our bssid will be received. Change that to any frame, since
firmware should allow to transmit frames on passive channel when it
receives any frame with valid CRC sum.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/iwlegacy/4965-mac.c | 13 ++++++-------
 drivers/net/wireless/iwlegacy/common.c   | 11 ++++++-----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index b083502..2c77431 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -588,11 +588,9 @@ il4965_pass_packet_to_mac80211(struct il_priv *il, struct ieee80211_hdr *hdr,
 		return;
 	}
 
-	if (unlikely(test_bit(IL_STOP_REASON_PASSIVE, &il->stop_reason)) &&
-	    ieee80211_is_beacon(fc) &&
-	    ether_addr_equal(hdr->addr3, il->active.bssid_addr)) {
+	if (unlikely(test_bit(IL_STOP_REASON_PASSIVE, &il->stop_reason))) {
 		il_wake_queues_by_reason(il, IL_STOP_REASON_PASSIVE);
-		D_INFO("Woke queues - beacon received on passive channel\n");
+		D_INFO("Woke queues - frame received on passive channel\n");
 	}
 
 	/* In case of HW accelerated crypto and bad decryption, drop */
@@ -2815,9 +2813,10 @@ il4965_hdl_tx(struct il_priv *il, struct il_rx_buf *rxb)
 
 	/*
 	 * Firmware will not transmit frame on passive channel, if it not yet
-	 * received beacon frame on that channel. When this error happen, we
-	 * have to wait until firmware will unblock itself i.e. when we note
-	 * received beacon (see il4965_pass_packet_to_mac80211).
+	 * received some valid frame on that channel. When this error happen
+	 * we have to wait until firmware will unblock itself i.e. when we
+	 * note received beacon or other frame. We unblock queues in
+	 * il4965_pass_packet_to_mac80211 or in il_mac_bss_info_changed.
 	 */
 	if (unlikely(status == TX_STATUS_FAIL_PASSIVE_NO_RX) &&
 	    il->iw_mode == NL80211_IFTYPE_STATION) {
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index 9360d1f..3195aad 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -5307,11 +5307,12 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 		D_MAC80211("BSSID %pM\n", bss_conf->bssid);
 
 		/*
-		 * On passive channel we wait with blocked queues for a beacon.
-		 * If beacon will not be received (what is very unlikely, but
-		 * theoretically possible), mac80211 associate procedure will
-		 * time out and mac80211 will call us with NULL bssid. We have
-		 * to unblock queues on such condition.
+		 * On passive channel we wait with blocked queues to see if
+		 * there is traffic on that channel. If no frame will be
+		 * received (what is very unlikely since scan detects AP on
+		 * that channel, but theoretically possible), mac80211 associate
+		 * procedure will time out and mac80211 will call us with NULL
+		 * bssid. We have to unblock queues on such condition.
 		 */
 		if (is_zero_ether_addr(bss_conf->bssid))
 			il_wake_queues_by_reason(il, IL_STOP_REASON_PASSIVE);
-- 
1.7.11.7


  reply	other threads:[~2013-05-25  8:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23 12:20 [RFT/RFC 0/4] iwlegacy: workaround for firmware frame tx rejection Stanislaw Gruszka
2013-05-23 12:20 ` [RFT/RFC 1/4] iwlegacy: small refactoring of il_{stop,wake}_queue Stanislaw Gruszka
2013-05-23 12:20 ` [RFT/RFC 2/4] iwlegacy: add il_{stop,wake}_queues_by_reason functions Stanislaw Gruszka
2013-05-23 12:20 ` [RFT/RFC 3/4] iwlegacy: workaround for firmware frame tx rejection Stanislaw Gruszka
2013-05-23 12:21 ` [RFT/RFC 4/4] Revert "iwl4965: workaround connection regression on passive channel" Stanislaw Gruszka
2013-05-25  8:55   ` Stanislaw Gruszka [this message]
2013-05-24 20:26 ` [RFT/RFC 0/4] iwlegacy: workaround for firmware frame tx rejection Johannes Berg
2013-05-25  8:53   ` Stanislaw Gruszka
2013-05-24 23:18 ` Jake Edge
2013-05-25  6:49   ` Stanislaw Gruszka
2013-06-10 20:38 ` Jake Edge
2013-06-11  3:41   ` Jake Edge
2013-06-11 16:09     ` Stanislaw Gruszka
2013-06-11 19:17       ` Jake Edge
2013-06-12 14:39         ` Stanislaw Gruszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130525085503.GC1599@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=jake@lwn.net \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.