Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/dev/pci Pull up following revision(s) (requested by n...
details: https://anonhg.NetBSD.org/src/rev/d546053e4f7b
branches: netbsd-6
changeset: 777012:d546053e4f7b
user: bouyer <bouyer%NetBSD.org@localhost>
date: Sun Nov 15 20:27:34 2015 +0000
description:
Pull up following revision(s) (requested by nonaka in ticket #1330):
sys/dev/pci/if_iwnvar.h: revision 1.17
sys/dev/pci/if_iwn.c: revision 1.76
PR/50187: Don't use DS parameter set when 5GHz channel is scanning.
XXX: pullup-7
diffstat:
sys/dev/pci/if_iwn.c | 24 ++++++++++++++++++------
sys/dev/pci/if_iwnvar.h | 8 +++++---
2 files changed, 23 insertions(+), 9 deletions(-)
diffs (103 lines):
diff -r 4b75b6ec71b2 -r d546053e4f7b sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c Sun Nov 15 19:11:21 2015 +0000
+++ b/sys/dev/pci/if_iwn.c Sun Nov 15 20:27:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwn.c,v 1.62 2012/01/30 19:41:20 drochner Exp $ */
+/* $NetBSD: if_iwn.c,v 1.62.2.1 2015/11/15 20:27:34 bouyer Exp $ */
/* $OpenBSD: if_iwn.c,v 1.96 2010/05/13 09:25:03 damien Exp $ */
/*-
@@ -22,7 +22,7 @@
* adapters.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.62 2012/01/30 19:41:20 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.62.2.1 2015/11/15 20:27:34 bouyer Exp $");
#define IWN_USE_RBUF /* Use local storage for RX */
#undef IWN_HWCRYPTO /* XXX does not even compile yet */
@@ -301,7 +301,8 @@
static u_int8_t *ieee80211_add_xrates(u_int8_t *,
const struct ieee80211_rateset *);
-static void iwn_fix_channel(struct ieee80211com *, struct mbuf *);
+static void iwn_fix_channel(struct ieee80211com *, struct mbuf *,
+ struct iwn_rx_stat *);
#ifdef IWN_DEBUG
#define DPRINTF(x) do { if (iwn_debug > 0) printf x; } while (0)
@@ -1782,7 +1783,7 @@
/* XXX Not sure if call and flags are needed. */
ieee80211_node_table_reset(&ic->ic_scan);
ic->ic_flags |= IEEE80211_F_SCAN | IEEE80211_F_ASCAN;
- sc->sc_flags |= IWN_FLAG_SCANNING;
+ sc->sc_flags |= IWN_FLAG_SCANNING_2GHZ;
/* Make the link LED blink while we're scanning. */
iwn_set_led(sc, IWN_LED_LINK, 10, 10);
@@ -2005,7 +2006,7 @@
/* XXX Added for NetBSD: scans never stop without it */
if (ic->ic_state == IEEE80211_S_SCAN)
- iwn_fix_channel(ic, m);
+ iwn_fix_channel(ic, m, stat);
if (sc->sc_drvbpf != NULL) {
struct iwn_rx_radiotap_header *tap = &sc->sc_rxtap;
@@ -2432,6 +2433,8 @@
* We just finished scanning 2GHz channels,
* start scanning 5GHz ones.
*/
+ sc->sc_flags &= ~IWN_FLAG_SCANNING_2GHZ;
+ sc->sc_flags |= IWN_FLAG_SCANNING_5GHZ;
if (iwn_scan(sc, IEEE80211_CHAN_5GHZ) == 0)
break;
}
@@ -6078,8 +6081,10 @@
* XXX: Duplicated from if_iwi.c
*/
static void
-iwn_fix_channel(struct ieee80211com *ic, struct mbuf *m)
+iwn_fix_channel(struct ieee80211com *ic, struct mbuf *m,
+ struct iwn_rx_stat *stat)
{
+ struct iwn_softc *sc = ic->ic_ifp->if_softc;
struct ieee80211_frame *wh;
uint8_t subtype;
uint8_t *frm, *efrm;
@@ -6095,6 +6100,13 @@
subtype != IEEE80211_FC0_SUBTYPE_PROBE_RESP)
return;
+ if (sc->sc_flags & IWN_FLAG_SCANNING_5GHZ) {
+ int chan = le16toh(stat->chan);
+ if (chan < __arraycount(ic->ic_channels))
+ ic->ic_curchan = &ic->ic_channels[chan];
+ return;
+ }
+
frm = (uint8_t *)(wh + 1);
efrm = mtod(m, uint8_t *) + m->m_len;
diff -r 4b75b6ec71b2 -r d546053e4f7b sys/dev/pci/if_iwnvar.h
--- a/sys/dev/pci/if_iwnvar.h Sun Nov 15 19:11:21 2015 +0000
+++ b/sys/dev/pci/if_iwnvar.h Sun Nov 15 20:27:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwnvar.h,v 1.13 2011/05/15 13:56:20 christos Exp $ */
+/* $NetBSD: if_iwnvar.h,v 1.13.10.1 2015/11/15 20:27:34 bouyer Exp $ */
/* $OpenBSD: if_iwnvar.h,v 1.19 2010/05/05 19:47:43 damien Exp $ */
/*-
@@ -220,8 +220,10 @@
#define IWN_FLAG_HAS_11N (1 << 6)
#define IWN_FLAG_ENH_SENS (1 << 7)
/* Added for NetBSD */
-#define IWN_FLAG_SCANNING (1 << 8)
-#define IWN_FLAG_HW_INITED (1 << 9)
+#define IWN_FLAG_HW_INITED (1 << 8)
+#define IWN_FLAG_SCANNING_2GHZ (1 << 9)
+#define IWN_FLAG_SCANNING_5GHZ (1 << 10)
+#define IWN_FLAG_SCANNING (IWN_FLAG_SCANNING_2GHZ|IWN_FLAG_SCANNING_5GHZ)
uint8_t hw_type;
Home |
Main Index |
Thread Index |
Old Index