if_rtwn.c (b626f5a73a48f44a31a200291b141e1da408a2ff) | if_rtwn.c (0046e1868fb0f7704f0ba2fd9ec63321adbf0a8e) |
---|---|
1/* $OpenBSD: if_rtwn.c,v 1.6 2015/08/28 00:03:53 deraadt Exp $ */ 2 3/*- 4 * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> 5 * Copyright (c) 2015 Stefan Sperling <stsp@openbsd.org> 6 * 7 * Permission to use, copy, modify, and distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above --- 237 unchanged lines hidden (view full) --- 246} 247 248static int 249rtwn_attach(device_t dev) 250{ 251 struct rtwn_softc *sc = device_get_softc(dev); 252 struct ieee80211com *ic = &sc->sc_ic; 253 uint32_t lcsr; | 1/* $OpenBSD: if_rtwn.c,v 1.6 2015/08/28 00:03:53 deraadt Exp $ */ 2 3/*- 4 * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> 5 * Copyright (c) 2015 Stefan Sperling <stsp@openbsd.org> 6 * 7 * Permission to use, copy, modify, and distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above --- 237 unchanged lines hidden (view full) --- 246} 247 248static int 249rtwn_attach(device_t dev) 250{ 251 struct rtwn_softc *sc = device_get_softc(dev); 252 struct ieee80211com *ic = &sc->sc_ic; 253 uint32_t lcsr; |
254 uint8_t bands; | 254 uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)]; |
255 int i, count, error, rid; 256 257 sc->sc_dev = dev; 258 sc->sc_debug = 0; 259 260 /* 261 * Get the offset of the PCI Express Capability Structure in PCI 262 * Configuration Space. --- 85 unchanged lines hidden (view full) --- 348 | IEEE80211_C_MONITOR /* monitor mode */ 349 | IEEE80211_C_SHPREAMBLE /* short preamble supported */ 350 | IEEE80211_C_SHSLOT /* short slot time supported */ 351 | IEEE80211_C_WPA /* capable of WPA1+WPA2 */ 352 | IEEE80211_C_BGSCAN /* capable of bg scanning */ 353 | IEEE80211_C_WME /* 802.11e */ 354 ; 355 | 255 int i, count, error, rid; 256 257 sc->sc_dev = dev; 258 sc->sc_debug = 0; 259 260 /* 261 * Get the offset of the PCI Express Capability Structure in PCI 262 * Configuration Space. --- 85 unchanged lines hidden (view full) --- 348 | IEEE80211_C_MONITOR /* monitor mode */ 349 | IEEE80211_C_SHPREAMBLE /* short preamble supported */ 350 | IEEE80211_C_SHSLOT /* short slot time supported */ 351 | IEEE80211_C_WPA /* capable of WPA1+WPA2 */ 352 | IEEE80211_C_BGSCAN /* capable of bg scanning */ 353 | IEEE80211_C_WME /* 802.11e */ 354 ; 355 |
356 bands = 0; 357 setbit(&bands, IEEE80211_MODE_11B); 358 setbit(&bands, IEEE80211_MODE_11G); 359 ieee80211_init_channels(ic, NULL, &bands); | 356 memset(bands, 0, sizeof(bands)); 357 setbit(bands, IEEE80211_MODE_11B); 358 setbit(bands, IEEE80211_MODE_11G); 359 ieee80211_init_channels(ic, NULL, bands); |
360 361 ieee80211_ifattach(ic); 362 363 ic->ic_wme.wme_update = rtwn_updateedca; 364 ic->ic_update_mcast = rtwn_update_mcast; 365 ic->ic_scan_start =rtwn_scan_start; 366 ic->ic_scan_end = rtwn_scan_end; 367 ic->ic_set_channel = rtwn_set_channel; --- 3123 unchanged lines hidden --- | 360 361 ieee80211_ifattach(ic); 362 363 ic->ic_wme.wme_update = rtwn_updateedca; 364 ic->ic_update_mcast = rtwn_update_mcast; 365 ic->ic_scan_start =rtwn_scan_start; 366 ic->ic_scan_end = rtwn_scan_end; 367 ic->ic_set_channel = rtwn_set_channel; --- 3123 unchanged lines hidden --- |