Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/dev/pci iw[m/n]_init_channels -> get_radiocaps as ...
details: https://anonhg.NetBSD.org/src-all/rev/52e134137a3d
branches: trunk
changeset: 364244:52e134137a3d
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Mon Jan 11 12:22:03 2021 +1100
description:
iw[m/n]_init_channels -> get_radiocaps as done by (u)rtwn.
diffstat:
sys/dev/pci/if_iwm.c | 10 +++++++---
sys/dev/pci/if_iwn.c | 12 ++++++++----
2 files changed, 15 insertions(+), 7 deletions(-)
diffs (105 lines):
diff -r 3ca482ff1842 -r 52e134137a3d sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c Mon Jan 11 11:03:22 2021 +1100
+++ b/sys/dev/pci/if_iwm.c Mon Jan 11 12:22:03 2021 +1100
@@ -312,7 +312,6 @@
uint16_t *, size_t);
static void iwm_init_channel_map(struct iwm_softc *, const uint16_t * const,
const uint8_t *, size_t);
-static void iwm_init_channels(struct ieee80211com *);
static struct ieee80211vap *
iwm_vap_create(struct ieee80211com *,
const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
@@ -320,6 +319,8 @@
const uint8_t [IEEE80211_ADDR_LEN]);
static void iwm_vap_delete(struct ieee80211vap *);
static void iwm_parent(struct ieee80211com *);
+static void iwm_get_radiocaps(struct ieee80211com *, int, int *,
+ struct ieee80211_channel chans[]);
static void iwm_scan_start(struct ieee80211com *);
static void iwm_scan_end(struct ieee80211com *);
static void iwm_set_channel(struct ieee80211com *);
@@ -6800,7 +6801,8 @@
}
static void
-iwm_init_channels(struct ieee80211com *ic)
+iwm_get_radiocaps(struct ieee80211com *ic,
+ int maxchans, int *nchans, struct ieee80211_channel chans[])
{
uint8_t bands[IEEE80211_MODE_BYTES];
@@ -8200,7 +8202,8 @@
#endif
- iwm_init_channels(ic);
+ iwm_get_radiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans,
+ ic->ic_channels);
//ifp->if_percpuq = if_percpuq_create(ifp);
ieee80211_ifattach(ic);
@@ -8208,6 +8211,7 @@
ic->ic_vap_create = iwm_vap_create;
ic->ic_vap_delete = iwm_vap_delete;
ic->ic_parent = iwm_parent;
+ ic->ic_getradiocaps = iwm_get_radiocaps;
ic->ic_scan_start = iwm_scan_start;
ic->ic_scan_end = iwm_scan_end;
ic->ic_set_channel = iwm_set_channel;
diff -r 3ca482ff1842 -r 52e134137a3d sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c Mon Jan 11 11:03:22 2021 +1100
+++ b/sys/dev/pci/if_iwn.c Mon Jan 11 12:22:03 2021 +1100
@@ -245,7 +245,6 @@
static void iwn5000_ict_reset(struct iwn_softc *);
static int iwn_read_eeprom(struct iwn_softc *);
static void iwn4965_read_eeprom(struct iwn_softc *);
-static void iwn_init_channels(struct ieee80211com *);
static struct ieee80211vap *
iwn_vap_create(struct ieee80211com *,
const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
@@ -253,6 +252,8 @@
const uint8_t [IEEE80211_ADDR_LEN]);
static void iwn_vap_delete(struct ieee80211vap *);
static void iwn_parent(struct ieee80211com *);
+static void iwn_get_radiocaps(struct ieee80211com *, int, int *,
+ struct ieee80211_channel chans[]);
static void iwn_scan_start(struct ieee80211com *);
static void iwn_scan_end(struct ieee80211com *);
static void iwn_set_channel(struct ieee80211com *);
@@ -449,7 +450,8 @@
}
static void
-iwn_init_channels(struct ieee80211com *ic)
+iwn_get_radiocaps(struct ieee80211com *ic,
+ int maxchans, int *nchans, struct ieee80211_channel chans[])
{
uint8_t bands[IEEE80211_MODE_BYTES];
@@ -754,7 +756,8 @@
#endif
- iwn_init_channels(ic);
+ iwn_get_radiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans,
+ ic->ic_channels);
//ifp->if_percpuq = if_percpuq_create(ifp);
ieee80211_ifattach(ic);
@@ -762,6 +765,7 @@
ic->ic_vap_create = iwn_vap_create;
ic->ic_vap_delete = iwn_vap_delete;
ic->ic_parent = iwn_parent;
+ ic->ic_getradiocaps = iwn_get_radiocaps;
ic->ic_scan_start = iwn_scan_start;
ic->ic_scan_end = iwn_scan_end;
ic->ic_set_channel = iwn_set_channel;
@@ -6954,7 +6958,7 @@
ifp->if_flags &= ~IFF_OACTIVE;
ifp->if_flags |= IFF_RUNNING;
- iwn_init_channels(ic);
+ //iwn_init_channels(ic);
ieee80211_chan_init(ic);
ieee80211_media_status(ifp, &imr);
imr.ifm_active &= ~(IFM_MMASK | IFM_IEEE80211_TURBO);
Home |
Main Index |
Thread Index |
Old Index