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/f79b31b0997f
branches:  trunk
changeset: 375225:f79b31b0997f
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 e36ae33453c7 -r f79b31b0997f 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 @@ ipw_vap_create(struct ieee80211com *ic, 
     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 @@ ipw_vap_create(struct ieee80211com *ic, 
            ieee80211_media_status, macaddr);
 
        ic->ic_opmode = opmode;
+       sc->sc_des_esslen = 0;
 
        return &vap->vap;
 }
@@ -2212,12 +2214,12 @@ ipw_config(struct ipw_softc *sc)
 #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;
 
@@ -2229,9 +2231,9 @@ ipw_config(struct ipw_softc *sc)
 
        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 e36ae33453c7 -r f79b31b0997f 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 @@ struct ipw_softc {
        } 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