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 Initialize the channel list only once.



details:   https://anonhg.NetBSD.org/src-all/rev/ce3b8760f42a
branches:  trunk
changeset: 377676:ce3b8760f42a
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Wed May 13 12:19:00 2020 +1000

description:
Initialize the channel list only once.
Do not override the default getradiocaps.

diffstat:

 sys/dev/pci/if_iwn.c |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (40 lines):

diff -r 3afca129cbb0 -r ce3b8760f42a sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c      Wed May 13 12:09:40 2020 +1000
+++ b/sys/dev/pci/if_iwn.c      Wed May 13 12:19:00 2020 +1000
@@ -239,8 +239,7 @@ static void iwn_free_tx_ring(struct iwn_
 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_getradiocaps(struct ieee80211com *, int, int *,
-                   struct ieee80211_channel []);
+static void    iwn_init_channels(struct ieee80211com *);
 static struct ieee80211vap *
                iwn_vap_create(struct ieee80211com *,
                    const char [IFNAMSIZ], int, enum ieee80211_opmode, int,
@@ -432,8 +431,7 @@ iwn_match(device_t parent, cfdata_t matc
 }
 
 static void
-iwn_getradiocaps(struct ieee80211com *ic,
-    int maxchans, int *nchans, struct ieee80211_channel chans[])
+iwn_init_channels(struct ieee80211com *ic)
 {
         uint8_t bands[IEEE80211_MODE_BYTES];
 
@@ -726,15 +724,13 @@ iwn_config_complete(device_t self)
 #endif
 
 
-       iwn_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans, 
-           ic->ic_channels);
+       iwn_init_channels(ic);
 
        //ifp->if_percpuq = if_percpuq_create(ifp);
        ieee80211_ifattach(ic);
 
        ic->ic_vap_create = iwn_vap_create;
        ic->ic_vap_delete = iwn_vap_delete;
-       ic->ic_getradiocaps = iwn_getradiocaps;
        ic->ic_parent = iwn_parent;
        ic->ic_scan_start = iwn_scan;
        ic->ic_scan_end = iwn_scan_end;



Home | Main Index | Thread Index | Old Index