PERFORCE change 136369 for review

Sam Leffler sam at FreeBSD.org
Wed Feb 27 21:24:42 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=136369

Change 136369 by sam at sam_ebb on 2008/02/27 21:24:02

	add a workaround for passive scan channels; still need to
	investigate what the linux code does but attempts to get
	the intel linux driver to associate to my 11a ap's have
	all failed (likely pilot error)

Affected files ...

.. //depot/projects/vap/sys/dev/iwn/if_iwn.c#4 edit

Differences ...

==== //depot/projects/vap/sys/dev/iwn/if_iwn.c#4 (text+kox) ====

@@ -1631,8 +1631,28 @@
 	m = data->m, data->m = NULL;
 	ni = data->ni, data->ni = NULL;
 
-	if (m->m_flags & M_TXCB)
-		ieee80211_process_callback(ni, m, (status & 0x80) != 0);
+	if (m->m_flags & M_TXCB) {
+		/*
+		 * Channels marked for "radar" require traffic to be received
+		 * to unlock before we can transmit.  Until traffic is seen
+		 * any attempt to transmit is returned immediately with status
+		 * set to IWN_TX_FAIL_TX_LOCKED.  Unfortunately this can easily
+		 * happen on first authenticate after scanning.  To workaround
+		 * this we ignore a failure of this sort in AUTH state so the
+		 * 802.11 layer will fall back to using a timeout to wait for
+		 * the AUTH reply.  This allows the firmware time to see
+		 * traffic so a subsequent retry of AUTH succeeds.  It's
+		 * unclear why the firmware does not maintain state for
+		 * channels recently visited as this would allow immediate
+		 * use of the channel after a scan (where we see traffic).
+		 */
+		if (status == IWN_TX_FAIL_TX_LOCKED &&
+		    ni->ni_vap->iv_state == IEEE80211_S_AUTH)
+			ieee80211_process_callback(ni, m, 0);
+		else
+			ieee80211_process_callback(ni, m,
+			    (status & IWN_TX_FAIL) != 0);
+	}
 	m_freem(m);
 	ieee80211_free_node(ni);
 


More information about the p4-projects mailing list