Deleted Added
full compact
rt2860.c (292165) rt2860.c (293339)
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 *

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

13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 *
17 * $OpenBSD: rt2860.c,v 1.65 2010/10/23 14:24:54 damien Exp $
18 */
19
20#include <sys/cdefs.h>
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 *

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

13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 *
17 * $OpenBSD: rt2860.c,v 1.65 2010/10/23 14:24:54 damien Exp $
18 */
19
20#include <sys/cdefs.h>
21__FBSDID("$FreeBSD: head/sys/dev/ral/rt2860.c 292165 2015-12-13 20:48:24Z avos $");
21__FBSDID("$FreeBSD: head/sys/dev/ral/rt2860.c 293339 2016-01-07 18:41:03Z avos $");
22
23/*-
24 * Ralink Technology RT2860/RT3090/RT3390/RT3562/RT5390/RT5392 chipset driver
25 * http://www.ralinktech.com/
26 */
27
28#include <sys/param.h>
29#include <sys/sysctl.h>

--- 197 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;
22
23/*-
24 * Ralink Technology RT2860/RT3090/RT3390/RT3562/RT5390/RT5392 chipset driver
25 * http://www.ralinktech.com/
26 */
27
28#include <sys/param.h>
29#include <sys/sysctl.h>

--- 197 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 ---