rt2560.c (b626f5a73a48f44a31a200291b141e1da408a2ff) | rt2560.c (0046e1868fb0f7704f0ba2fd9ec63321adbf0a8e) |
---|---|
1/* $FreeBSD$ */ 2 3/*- 4 * Copyright (c) 2005, 2006 5 * Damien Bergamini <damien.bergamini@free.fr> 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 --- 185 unchanged lines hidden (view full) --- 194 RT2560_RF5222 195}; 196 197int 198rt2560_attach(device_t dev, int id) 199{ 200 struct rt2560_softc *sc = device_get_softc(dev); 201 struct ieee80211com *ic = &sc->sc_ic; | 1/* $FreeBSD$ */ 2 3/*- 4 * Copyright (c) 2005, 2006 5 * Damien Bergamini <damien.bergamini@free.fr> 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 --- 185 unchanged lines hidden (view full) --- 194 RT2560_RF5222 195}; 196 197int 198rt2560_attach(device_t dev, int id) 199{ 200 struct rt2560_softc *sc = device_get_softc(dev); 201 struct ieee80211com *ic = &sc->sc_ic; |
202 uint8_t bands; | 202 uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)]; |
203 int error; 204 205 sc->sc_dev = dev; 206 207 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, 208 MTX_DEF | MTX_RECURSE); 209 210 callout_init_mtx(&sc->watchdog_ch, &sc->sc_mtx, 0); --- 62 unchanged lines hidden (view full) --- 273 | IEEE80211_C_SHSLOT /* short slot time supported */ 274 | IEEE80211_C_WPA /* capable of WPA1+WPA2 */ 275 | IEEE80211_C_BGSCAN /* capable of bg scanning */ 276#ifdef notyet 277 | IEEE80211_C_TXFRAG /* handle tx frags */ 278#endif 279 ; 280 | 203 int error; 204 205 sc->sc_dev = dev; 206 207 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, 208 MTX_DEF | MTX_RECURSE); 209 210 callout_init_mtx(&sc->watchdog_ch, &sc->sc_mtx, 0); --- 62 unchanged lines hidden (view full) --- 273 | IEEE80211_C_SHSLOT /* short slot time supported */ 274 | IEEE80211_C_WPA /* capable of WPA1+WPA2 */ 275 | IEEE80211_C_BGSCAN /* capable of bg scanning */ 276#ifdef notyet 277 | IEEE80211_C_TXFRAG /* handle tx frags */ 278#endif 279 ; 280 |
281 bands = 0; 282 setbit(&bands, IEEE80211_MODE_11B); 283 setbit(&bands, IEEE80211_MODE_11G); | 281 memset(bands, 0, sizeof(bands)); 282 setbit(bands, IEEE80211_MODE_11B); 283 setbit(bands, IEEE80211_MODE_11G); |
284 if (sc->rf_rev == RT2560_RF_5222) | 284 if (sc->rf_rev == RT2560_RF_5222) |
285 setbit(&bands, IEEE80211_MODE_11A); 286 ieee80211_init_channels(ic, NULL, &bands); | 285 setbit(bands, IEEE80211_MODE_11A); 286 ieee80211_init_channels(ic, NULL, bands); |
287 288 ieee80211_ifattach(ic); 289 ic->ic_raw_xmit = rt2560_raw_xmit; 290 ic->ic_updateslot = rt2560_update_slot; 291 ic->ic_update_promisc = rt2560_update_promisc; 292 ic->ic_scan_start = rt2560_scan_start; 293 ic->ic_scan_end = rt2560_scan_end; 294 ic->ic_set_channel = rt2560_set_channel; --- 2451 unchanged lines hidden --- | 287 288 ieee80211_ifattach(ic); 289 ic->ic_raw_xmit = rt2560_raw_xmit; 290 ic->ic_updateslot = rt2560_update_slot; 291 ic->ic_update_promisc = rt2560_update_promisc; 292 ic->ic_scan_start = rt2560_scan_start; 293 ic->ic_scan_end = rt2560_scan_end; 294 ic->ic_set_channel = rt2560_set_channel; --- 2451 unchanged lines hidden --- |