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 Some more converted to the new stack.



details:   https://anonhg.NetBSD.org/src-all/rev/88de3da8a794
branches:  trunk
changeset: 367230:88de3da8a794
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Tue Mar 08 04:02:14 2022 +1100

description:
Some more converted to the new stack.

diffstat:

 sys/dev/pci/if_ipw.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (53 lines):

diff -r e35dd292f0ac -r 88de3da8a794 sys/dev/pci/if_ipw.c
--- a/sys/dev/pci/if_ipw.c      Mon Mar 07 18:36:37 2022 +1100
+++ b/sys/dev/pci/if_ipw.c      Tue Mar 08 04:02:14 2022 +1100
@@ -1662,7 +1662,6 @@
                    (m0 = m_pullup(m0, sizeof (struct ether_header))) == NULL)
                        continue;
 
-               eh = mtod(m0, struct ether_header *);
                if (ni == NULL) {
                        m_freem(m0);
                        continue;
@@ -2106,6 +2105,7 @@
 ipw_config(struct ipw_softc *sc)
 {
        struct ieee80211com *ic = &sc->sc_ic;
+       struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
        struct ifnet *ifp = &sc->sc_if;
        struct ipw_security security;
        struct ieee80211_key *k;
@@ -2129,6 +2129,8 @@
        case IEEE80211_M_MONITOR:
                data = htole32(IPW_MODE_MONITOR);
                break;
+       default:
+               break;
        }
        DPRINTF(("Setting mode to %u\n", le32toh(data)));
        error = ipw_cmd(sc, IPW_CMD_SET_MODE, &data, sizeof data);
@@ -2137,7 +2139,7 @@
 
        if (ic->ic_opmode == IEEE80211_M_IBSS ||
            ic->ic_opmode == IEEE80211_M_MONITOR) {
-               data = htole32(ieee80211_chan2ieee(ic, ic->ic_ibss_chan));
+               data = htole32(ieee80211_chan2ieee(ic, ic->ic_bsschan));
                DPRINTF(("Setting channel to %u\n", le32toh(data)));
                error = ipw_cmd(sc, IPW_CMD_SET_CHANNEL, &data, sizeof data);
                if (error != 0)
@@ -2196,13 +2198,13 @@
                        return error;
        }
 
-       data = htole32(ic->ic_rtsthreshold);
+       data = htole32(vap->iv_rtsthreshold);
        DPRINTF(("Setting RTS threshold to %u\n", le32toh(data)));
        error = ipw_cmd(sc, IPW_CMD_SET_RTS_THRESHOLD, &data, sizeof data);
        if (error != 0)
                return error;
 
-       data = htole32(ic->ic_fragthreshold);
+       data = htole32(vap->iv_fragthreshold);
        DPRINTF(("Setting frag threshold to %u\n", le32toh(data)));
        error = ipw_cmd(sc, IPW_CMD_SET_FRAG_THRESHOLD, &data, sizeof data);
        if (error != 0)



Home | Main Index | Thread Index | Old Index