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 ess and bss id and len workaround.



details:   https://anonhg.NetBSD.org/src-all/rev/44f0a81cd3f5
branches:  trunk
changeset: 363376:44f0a81cd3f5
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Tue Mar 08 04:11:27 2022 +1100

description:
ess and bss id and len workaround.

diffstat:

 sys/dev/pci/if_ipw.c    |  12 +++++++-----
 sys/dev/pci/if_ipwvar.h |   3 +++
 2 files changed, 10 insertions(+), 5 deletions(-)

diffs (60 lines):

diff -r d54c18ba7379 -r 44f0a81cd3f5 sys/dev/pci/if_ipw.c
--- a/sys/dev/pci/if_ipw.c      Tue Mar 08 04:02:14 2022 +1100
+++ b/sys/dev/pci/if_ipw.c      Tue Mar 08 04:11:27 2022 +1100
@@ -406,6 +406,7 @@
     const uint8_t bssid[IEEE80211_ADDR_LEN],
     const uint8_t macaddr[IEEE80211_ADDR_LEN])
 {
+       struct ipw_softc *sc = ic->ic_softc;
        struct ipw_vap *vap;
 
        /* Allocate the vap and setup. */
@@ -428,6 +429,7 @@
            ieee80211_media_status, macaddr);
 
        ic->ic_opmode = opmode;
+       sc->sc_des_esslen = 0;
 
        return &vap->vap;
 }
@@ -2213,12 +2215,12 @@
 #ifdef IPW_DEBUG
        if (ipw_debug > 0) {
                printf("Setting ESSID to ");
-               ieee80211_print_essid(ic->ic_des_essid, ic->ic_des_esslen);
+               ieee80211_print_essid(sc->sc_des_essid, sc->sc_des_esslen);
                printf("\n");
        }
 #endif
-       error = ipw_cmd(sc, IPW_CMD_SET_ESSID, ic->ic_des_essid,
-           ic->ic_des_esslen);
+       error = ipw_cmd(sc, IPW_CMD_SET_ESSID, sc->sc_des_essid,
+           sc->sc_des_esslen);
        if (error != 0)
                return error;
 
@@ -2230,9 +2232,9 @@
 
        if (ic->ic_flags & IEEE80211_F_DESBSSID) {
                DPRINTF(("Setting desired BSSID to %s\n",
-                   ether_sprintf(ic->ic_des_bssid)));
+                   ether_sprintf(sc->sc_des_bssid)));
                error = ipw_cmd(sc, IPW_CMD_SET_DESIRED_BSSID,
-                   ic->ic_des_bssid, IEEE80211_ADDR_LEN);
+                   sc->sc_des_bssid, IEEE80211_ADDR_LEN);
                if (error != 0)
                        return error;
        }
diff -r d54c18ba7379 -r 44f0a81cd3f5 sys/dev/pci/if_ipwvar.h
--- a/sys/dev/pci/if_ipwvar.h   Tue Mar 08 04:02:14 2022 +1100
+++ b/sys/dev/pci/if_ipwvar.h   Tue Mar 08 04:11:27 2022 +1100
@@ -165,6 +165,9 @@
        } sc_txtapu;
 #define sc_txtap       sc_txtapu.th
        int                             sc_txtap_len;
+       uint8_t         sc_des_essid[IEEE80211_NWID_LEN];
+       uint8_t         sc_des_bssid[IEEE80211_NWID_LEN];
+       int             sc_des_esslen;
 };
 
 #define        sc_if   sc_ec.ec_if



Home | Main Index | Thread Index | Old Index