From owner-p4-projects@FreeBSD.ORG Wed Feb 27 21:24:41 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9FCC21065672; Wed, 27 Feb 2008 21:24:41 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6158A1065670 for ; Wed, 27 Feb 2008 21:24:41 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 53C2A8FC1D for ; Wed, 27 Feb 2008 21:24:41 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1RLOf3Y029406 for ; Wed, 27 Feb 2008 21:24:41 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1RLOe9g029403 for perforce@freebsd.org; Wed, 27 Feb 2008 21:24:40 GMT (envelope-from sam@freebsd.org) Date: Wed, 27 Feb 2008 21:24:40 GMT Message-Id: <200802272124.m1RLOe9g029403@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 136369 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2008 21:24:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=136369 Change 136369 by sam@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);