FreeBSD Bugzilla – Attachment 179774 Details for
Bug 216923
iwi(4): cannot use channels 12 and 13 for DE/ETSI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
svn diff for iwi(4) (stable/11, r313440)
if_iwi.c.diff (text/plain), 3.05 KB, created by
Taras Korenko
on 2017-02-08 21:16:08 UTC
(
hide
)
Description:
svn diff for iwi(4) (stable/11, r313440)
Filename:
MIME Type:
Creator:
Taras Korenko
Created:
2017-02-08 21:16:08 UTC
Size:
3.05 KB
patch
obsolete
>Index: sys/dev/iwi/if_iwi.c >=================================================================== >--- sys/dev/iwi/if_iwi.c (revision 313440) >+++ sys/dev/iwi/if_iwi.c (working copy) >@@ -130,6 +130,15 @@ > { 0, 0, NULL } > }; > >+static const uint8_t def_chan_2ghz[] = >+ { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; >+static const uint8_t def_chan_5ghz_band1[] = >+ { 36, 40, 44, 48, 52, 56, 60, 64 }; >+static const uint8_t def_chan_5ghz_band2[] = >+ { 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140 }; >+static const uint8_t def_chan_5ghz_band3[] = >+ { 149, 153, 157, 161, 165 }; >+ > static struct ieee80211vap *iwi_vap_create(struct ieee80211com *, > const char [IFNAMSIZ], int, enum ieee80211_opmode, int, > const uint8_t [IEEE80211_ADDR_LEN], >@@ -204,6 +213,9 @@ > static void iwi_sysctlattach(struct iwi_softc *); > static void iwi_led_event(struct iwi_softc *, int); > static void iwi_ledattach(struct iwi_softc *); >+static void iwi_collect_bands(struct ieee80211com *, uint8_t [], size_t); >+static void iwi_getradiocaps(struct ieee80211com *, int, int *, >+ struct ieee80211_channel []); > > static int iwi_probe(device_t); > static int iwi_attach(device_t); >@@ -374,11 +386,7 @@ > ic->ic_macaddr[4] = val & 0xff; > ic->ic_macaddr[5] = val >> 8; > >- memset(bands, 0, sizeof(bands)); >- setbit(bands, IEEE80211_MODE_11B); >- setbit(bands, IEEE80211_MODE_11G); >- if (pci_get_device(dev) >= 0x4223) >- setbit(bands, IEEE80211_MODE_11A); >+ iwi_collect_bands(ic, bands, sizeof(bands)); > ieee80211_init_channels(ic, NULL, bands); > > ieee80211_ifattach(ic); >@@ -399,6 +407,7 @@ > ic->ic_ioctl = iwi_ioctl; > ic->ic_transmit = iwi_transmit; > ic->ic_parent = iwi_parent; >+ ic->ic_getradiocaps = iwi_getradiocaps; > > ieee80211_radiotap_attach(ic, > &sc->sc_txtap.wt_ihdr, sizeof(sc->sc_txtap), >@@ -3569,3 +3578,40 @@ > iwi_cmd(sc, IWI_CMD_ABORT_SCAN, NULL, 0); > IWI_UNLOCK(sc); > } >+ >+static void >+iwi_collect_bands(struct ieee80211com *ic, uint8_t bands[], size_t bands_sz) >+{ >+ struct iwi_softc *sc = ic->ic_softc; >+ device_t dev = sc->sc_dev; >+ >+ memset(bands, 0, bands_sz); >+ setbit(bands, IEEE80211_MODE_11B); >+ setbit(bands, IEEE80211_MODE_11G); >+ if (pci_get_device(dev) >= 0x4223) >+ setbit(bands, IEEE80211_MODE_11A); >+} >+ >+static void >+iwi_getradiocaps(struct ieee80211com *ic, >+ int maxchans, int *nchans, struct ieee80211_channel chans[]) >+{ >+ uint8_t bands[IEEE80211_MODE_BYTES]; >+ >+ iwi_collect_bands(ic, bands, sizeof(bands)); >+ *nchans = 0; >+ if (isset(bands, IEEE80211_MODE_11B) || isset(bands, IEEE80211_MODE_11G)) >+ ieee80211_add_channel_list_2ghz(chans, maxchans, nchans, >+ def_chan_2ghz, nitems(def_chan_2ghz), bands, 0); >+ if (isset(bands, IEEE80211_MODE_11A)) { >+ ieee80211_add_channel_list_5ghz(chans, maxchans, nchans, >+ def_chan_5ghz_band1, nitems(def_chan_5ghz_band1), >+ bands, 0); >+ ieee80211_add_channel_list_5ghz(chans, maxchans, nchans, >+ def_chan_5ghz_band2, nitems(def_chan_5ghz_band2), >+ bands, 0); >+ ieee80211_add_channel_list_5ghz(chans, maxchans, nchans, >+ def_chan_5ghz_band3, nitems(def_chan_5ghz_band3), >+ bands, 0); >+ } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 216923
: 179774