Deleted Added
full compact
if_otus.c (292165) if_otus.c (293339)
1/* $OpenBSD: if_otus.c,v 1.46 2015/03/14 03:38:49 jsg Exp $ */
2
3/*-
4 * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
5 * Copyright (c) 2015 Adrian Chadd <adrian@FreeBSD.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

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

17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 */
19
20/*
21 * Driver for Atheros AR9001U chipset.
22 */
23
24#include <sys/cdefs.h>
1/* $OpenBSD: if_otus.c,v 1.46 2015/03/14 03:38:49 jsg Exp $ */
2
3/*-
4 * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
5 * Copyright (c) 2015 Adrian Chadd <adrian@FreeBSD.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

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

17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 */
19
20/*
21 * Driver for Atheros AR9001U chipset.
22 */
23
24#include <sys/cdefs.h>
25__FBSDID("$FreeBSD: head/sys/dev/otus/if_otus.c 292165 2015-12-13 20:48:24Z avos $");
25__FBSDID("$FreeBSD: head/sys/dev/otus/if_otus.c 293339 2016-01-07 18:41:03Z avos $");
26
27#include "opt_wlan.h"
28
29#include <sys/param.h>
30#include <sys/endian.h>
31#include <sys/sockio.h>
32#include <sys/mbuf.h>
33#include <sys/kernel.h>

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

619}
620
621static int
622otus_attachhook(struct otus_softc *sc)
623{
624 struct ieee80211com *ic = &sc->sc_ic;
625 usb_device_request_t req;
626 uint32_t in, out;
26
27#include "opt_wlan.h"
28
29#include <sys/param.h>
30#include <sys/endian.h>
31#include <sys/sockio.h>
32#include <sys/mbuf.h>
33#include <sys/kernel.h>

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

619}
620
621static int
622otus_attachhook(struct otus_softc *sc)
623{
624 struct ieee80211com *ic = &sc->sc_ic;
625 usb_device_request_t req;
626 uint32_t in, out;
627 uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
627 int error;
628 int error;
628 uint8_t bands;
629
630 /* Not locked */
631 error = otus_load_firmware(sc, "otusfw_init", AR_FW_INIT_ADDR);
632 if (error != 0) {
633 device_printf(sc->sc_dev, "%s: could not load %s firmware\n",
634 __func__, "init");
635 return (ENXIO);
636 }

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

738 }
739#endif
740
741#if 0
742 /* Build the list of supported channels. */
743 otus_get_chanlist(sc);
744#else
745 /* Set supported .11b and .11g rates. */
629
630 /* Not locked */
631 error = otus_load_firmware(sc, "otusfw_init", AR_FW_INIT_ADDR);
632 if (error != 0) {
633 device_printf(sc->sc_dev, "%s: could not load %s firmware\n",
634 __func__, "init");
635 return (ENXIO);
636 }

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

738 }
739#endif
740
741#if 0
742 /* Build the list of supported channels. */
743 otus_get_chanlist(sc);
744#else
745 /* Set supported .11b and .11g rates. */
746 bands = 0;
746 memset(bands, 0, sizeof(bands));
747 if (sc->eeprom.baseEepHeader.opCapFlags & AR5416_OPFLAGS_11G) {
747 if (sc->eeprom.baseEepHeader.opCapFlags & AR5416_OPFLAGS_11G) {
748 setbit(&bands, IEEE80211_MODE_11B);
749 setbit(&bands, IEEE80211_MODE_11G);
748 setbit(bands, IEEE80211_MODE_11B);
749 setbit(bands, IEEE80211_MODE_11G);
750 }
751 if (sc->eeprom.baseEepHeader.opCapFlags & AR5416_OPFLAGS_11A) {
750 }
751 if (sc->eeprom.baseEepHeader.opCapFlags & AR5416_OPFLAGS_11A) {
752 setbit(&bands, IEEE80211_MODE_11A);
752 setbit(bands, IEEE80211_MODE_11A);
753 }
754#if 0
755 if (sc->sc_ht)
753 }
754#if 0
755 if (sc->sc_ht)
756 setbit(&bands, IEEE80211_MODE_11NG);
756 setbit(bands, IEEE80211_MODE_11NG);
757#endif
757#endif
758 ieee80211_init_channels(ic, NULL, &bands);
758 ieee80211_init_channels(ic, NULL, bands);
759#endif
760
761 ieee80211_ifattach(ic);
762 ic->ic_raw_xmit = otus_raw_xmit;
763 ic->ic_scan_start = otus_scan_start;
764 ic->ic_scan_end = otus_scan_end;
765 ic->ic_set_channel = otus_set_channel;
766 ic->ic_vap_create = otus_vap_create;

--- 2410 unchanged lines hidden ---
759#endif
760
761 ieee80211_ifattach(ic);
762 ic->ic_raw_xmit = otus_raw_xmit;
763 ic->ic_scan_start = otus_scan_start;
764 ic->ic_scan_end = otus_scan_end;
765 ic->ic_set_channel = otus_set_channel;
766 ic->ic_vap_create = otus_vap_create;

--- 2410 unchanged lines hidden ---