rt2860.c (b626f5a73a48f44a31a200291b141e1da408a2ff) | rt2860.c (0046e1868fb0f7704f0ba2fd9ec63321adbf0a8e) |
---|---|
1/*- 2 * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr> 3 * Copyright (c) 2012 Bernhard Schmidt <bschmidt@FreeBSD.org> 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 218 unchanged lines hidden (view full) --- 227}; 228 229int 230rt2860_attach(device_t dev, int id) 231{ 232 struct rt2860_softc *sc = device_get_softc(dev); 233 struct ieee80211com *ic = &sc->sc_ic; 234 uint32_t tmp; | 1/*- 2 * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr> 3 * Copyright (c) 2012 Bernhard Schmidt <bschmidt@FreeBSD.org> 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 218 unchanged lines hidden (view full) --- 227}; 228 229int 230rt2860_attach(device_t dev, int id) 231{ 232 struct rt2860_softc *sc = device_get_softc(dev); 233 struct ieee80211com *ic = &sc->sc_ic; 234 uint32_t tmp; |
235 uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)]; |
|
235 int error, ntries, qid; | 236 int error, ntries, qid; |
236 uint8_t bands; | |
237 238 sc->sc_dev = dev; 239 sc->sc_debug = 0; 240 241 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, 242 MTX_DEF | MTX_RECURSE); 243 244 callout_init_mtx(&sc->watchdog_ch, &sc->sc_mtx, 0); --- 69 unchanged lines hidden (view full) --- 314 | IEEE80211_C_SHSLOT /* short slot time supported */ 315 | IEEE80211_C_WPA /* capable of WPA1+WPA2 */ 316#if 0 317 | IEEE80211_C_BGSCAN /* capable of bg scanning */ 318#endif 319 | IEEE80211_C_WME /* 802.11e */ 320 ; 321 | 237 238 sc->sc_dev = dev; 239 sc->sc_debug = 0; 240 241 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, 242 MTX_DEF | MTX_RECURSE); 243 244 callout_init_mtx(&sc->watchdog_ch, &sc->sc_mtx, 0); --- 69 unchanged lines hidden (view full) --- 314 | IEEE80211_C_SHSLOT /* short slot time supported */ 315 | IEEE80211_C_WPA /* capable of WPA1+WPA2 */ 316#if 0 317 | IEEE80211_C_BGSCAN /* capable of bg scanning */ 318#endif 319 | IEEE80211_C_WME /* 802.11e */ 320 ; 321 |
322 bands = 0; 323 setbit(&bands, IEEE80211_MODE_11B); 324 setbit(&bands, IEEE80211_MODE_11G); | 322 memset(bands, 0, sizeof(bands)); 323 setbit(bands, IEEE80211_MODE_11B); 324 setbit(bands, IEEE80211_MODE_11G); |
325 if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850) | 325 if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850) |
326 setbit(&bands, IEEE80211_MODE_11A); 327 ieee80211_init_channels(ic, NULL, &bands); | 326 setbit(bands, IEEE80211_MODE_11A); 327 ieee80211_init_channels(ic, NULL, bands); |
328 329 ieee80211_ifattach(ic); 330 331 ic->ic_wme.wme_update = rt2860_updateedca; 332 ic->ic_scan_start = rt2860_scan_start; 333 ic->ic_scan_end = rt2860_scan_end; 334 ic->ic_set_channel = rt2860_set_channel; 335 ic->ic_updateslot = rt2860_updateslot; --- 3995 unchanged lines hidden --- | 328 329 ieee80211_ifattach(ic); 330 331 ic->ic_wme.wme_update = rt2860_updateedca; 332 ic->ic_scan_start = rt2860_scan_start; 333 ic->ic_scan_end = rt2860_scan_end; 334 ic->ic_set_channel = rt2860_set_channel; 335 ic->ic_updateslot = rt2860_updateslot; --- 3995 unchanged lines hidden --- |