Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152817400
D6145.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D6145.diff
View Options
Index: head/sys/dev/otus/if_otus.c
===================================================================
--- head/sys/dev/otus/if_otus.c
+++ head/sys/dev/otus/if_otus.c
@@ -132,6 +132,8 @@
static int otus_attachhook(struct otus_softc *);
void otus_get_chanlist(struct otus_softc *);
+static void otus_getradiocaps(struct ieee80211com *, int, int *,
+ struct ieee80211_channel[]);
int otus_load_firmware(struct otus_softc *, const char *,
uint32_t);
int otus_open_pipes(struct otus_softc *);
@@ -624,7 +626,6 @@
struct ieee80211com *ic = &sc->sc_ic;
usb_device_request_t req;
uint32_t in, out;
- uint8_t bands[IEEE80211_MODE_BYTES];
int error;
/* Not locked */
@@ -742,20 +743,8 @@
/* Build the list of supported channels. */
otus_get_chanlist(sc);
#else
- /* Set supported .11b and .11g rates. */
- memset(bands, 0, sizeof(bands));
- if (sc->eeprom.baseEepHeader.opCapFlags & AR5416_OPFLAGS_11G) {
- setbit(bands, IEEE80211_MODE_11B);
- setbit(bands, IEEE80211_MODE_11G);
- }
- if (sc->eeprom.baseEepHeader.opCapFlags & AR5416_OPFLAGS_11A) {
- setbit(bands, IEEE80211_MODE_11A);
- }
-#if 0
- if (sc->sc_ht)
- setbit(bands, IEEE80211_MODE_11NG);
-#endif
- ieee80211_init_channels(ic, NULL, bands);
+ otus_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans,
+ ic->ic_channels);
#endif
ieee80211_ifattach(ic);
@@ -763,6 +752,7 @@
ic->ic_scan_start = otus_scan_start;
ic->ic_scan_end = otus_scan_end;
ic->ic_set_channel = otus_set_channel;
+ ic->ic_getradiocaps = otus_getradiocaps;
ic->ic_vap_create = otus_vap_create;
ic->ic_vap_delete = otus_vap_delete;
ic->ic_update_mcast = otus_update_mcast;
@@ -820,6 +810,32 @@
}
}
+static void
+otus_getradiocaps(struct ieee80211com *ic,
+ int maxchans, int *nchans, struct ieee80211_channel chans[])
+{
+ struct otus_softc *sc = ic->ic_softc;
+ uint8_t bands[IEEE80211_MODE_BYTES];
+
+ /* Set supported .11b and .11g rates. */
+ memset(bands, 0, sizeof(bands));
+ if (sc->eeprom.baseEepHeader.opCapFlags & AR5416_OPFLAGS_11G) {
+ setbit(bands, IEEE80211_MODE_11B);
+ setbit(bands, IEEE80211_MODE_11G);
+#if 0
+ if (sc->sc_ht)
+ setbit(bands, IEEE80211_MODE_11NG);
+#endif
+ ieee80211_add_channel_list_2ghz(chans, maxchans, nchans,
+ ar_chans, 14, bands, 0);
+ }
+ if (sc->eeprom.baseEepHeader.opCapFlags & AR5416_OPFLAGS_11A) {
+ setbit(bands, IEEE80211_MODE_11A);
+ ieee80211_add_channel_list_5ghz(chans, maxchans, nchans,
+ &ar_chans[14], nitems(ar_chans) - 14, bands, 0);
+ }
+}
+
int
otus_load_firmware(struct otus_softc *sc, const char *name, uint32_t addr)
{
Index: head/sys/dev/otus/if_otusreg.h
===================================================================
--- head/sys/dev/otus/if_otusreg.h
+++ head/sys/dev/otus/if_otusreg.h
@@ -348,8 +348,8 @@
/* List of supported channels. */
static const uint8_t ar_chans[] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124,
- 128, 132, 136, 140, 149, 153, 157, 161, 165, 34, 38, 42, 46
+ 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64, 100, 104, 108,
+ 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165
};
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 18, 7:34 AM (6 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31706222
Default Alt Text
D6145.diff (3 KB)
Attached To
Mode
D6145: otus: switch to ieee80211_add_channel_list_*()
Attached
Detach File
Event Timeline
Log In to Comment