rt2661.c (b626f5a73a48f44a31a200291b141e1da408a2ff) rt2661.c (0046e1868fb0f7704f0ba2fd9ec63321adbf0a8e)
1/* $FreeBSD$ */
2
3/*-
4 * Copyright (c) 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};
195
196int
197rt2661_attach(device_t dev, int id)
198{
199 struct rt2661_softc *sc = device_get_softc(dev);
200 struct ieee80211com *ic = &sc->sc_ic;
201 uint32_t val;
1/* $FreeBSD$ */
2
3/*-
4 * Copyright (c) 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};
195
196int
197rt2661_attach(device_t dev, int id)
198{
199 struct rt2661_softc *sc = device_get_softc(dev);
200 struct ieee80211com *ic = &sc->sc_ic;
201 uint32_t val;
202 uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
202 int error, ac, ntries;
203 int error, ac, ntries;
203 uint8_t bands;
204
205 sc->sc_id = id;
206 sc->sc_dev = dev;
207
208 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
209 MTX_DEF | MTX_RECURSE);
210
211 callout_init_mtx(&sc->watchdog_ch, &sc->sc_mtx, 0);

--- 62 unchanged lines hidden (view full) ---

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 | IEEE80211_C_WME /* 802.11e */
279#endif
280 ;
281
204
205 sc->sc_id = id;
206 sc->sc_dev = dev;
207
208 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
209 MTX_DEF | MTX_RECURSE);
210
211 callout_init_mtx(&sc->watchdog_ch, &sc->sc_mtx, 0);

--- 62 unchanged lines hidden (view full) ---

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 | IEEE80211_C_WME /* 802.11e */
279#endif
280 ;
281
282 bands = 0;
283 setbit(&bands, IEEE80211_MODE_11B);
284 setbit(&bands, IEEE80211_MODE_11G);
282 memset(bands, 0, sizeof(bands));
283 setbit(bands, IEEE80211_MODE_11B);
284 setbit(bands, IEEE80211_MODE_11G);
285 if (sc->rf_rev == RT2661_RF_5225 || sc->rf_rev == RT2661_RF_5325)
285 if (sc->rf_rev == RT2661_RF_5225 || sc->rf_rev == RT2661_RF_5325)
286 setbit(&bands, IEEE80211_MODE_11A);
287 ieee80211_init_channels(ic, NULL, &bands);
286 setbit(bands, IEEE80211_MODE_11A);
287 ieee80211_init_channels(ic, NULL, bands);
288
289 ieee80211_ifattach(ic);
290#if 0
291 ic->ic_wme.wme_update = rt2661_wme_update;
292#endif
293 ic->ic_scan_start = rt2661_scan_start;
294 ic->ic_scan_end = rt2661_scan_end;
295 ic->ic_set_channel = rt2661_set_channel;

--- 2478 unchanged lines hidden ---
288
289 ieee80211_ifattach(ic);
290#if 0
291 ic->ic_wme.wme_update = rt2661_wme_update;
292#endif
293 ic->ic_scan_start = rt2661_scan_start;
294 ic->ic_scan_end = rt2661_scan_end;
295 ic->ic_set_channel = rt2661_set_channel;

--- 2478 unchanged lines hidden ---