Currently, iwn(4) does not track HT protection changes because the
support code was broken and hence disabled.

Here's a fixed version which should allow us to enable HT protection
updates again.

Index: if_iwn.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v
retrieving revision 1.165
diff -u -p -r1.165 if_iwn.c
--- if_iwn.c    28 Apr 2016 08:28:18 -0000      1.165
+++ if_iwn.c    25 May 2016 18:47:34 -0000
@@ -5046,11 +5046,8 @@ iwn_delete_key(struct ieee80211com *ic, 
 void
 iwn_update_htprot(struct ieee80211com *ic, struct ieee80211_node *ni)
 {
-       /* XXX Disabled for now. It seems to cause output errors
-        * (tx status=0x83) and to make block ack sessions degrade
-        * into a half-working state. */
-#if 0
        struct iwn_softc *sc = ic->ic_softc;
+       struct iwn_ops *ops = &sc->ops;
        enum ieee80211_htprot htprot;
        struct iwn_rxon_assoc rxon_assoc;
        int s, error;
@@ -5072,11 +5069,19 @@ iwn_update_htprot(struct ieee80211com *i
        rxon_assoc.rxchain = sc->rxon.rxchain;
        rxon_assoc.acquisition = sc->rxon.acquisition;
 
+       s = splnet();
+
        error = iwn_cmd(sc, IWN_CMD_RXON_ASSOC, &rxon_assoc,
            sizeof(rxon_assoc), 1);
        if (error != 0)
                printf("%s: RXON_ASSOC command failed\n", sc->sc_dev.dv_xname);
-#endif
+
+       /* All RXONs wipe the firmware's txpower table. Restore it. */
+       error = ops->set_txpower(sc, 1);
+       if (error != 0)
+               printf("%s: could not set TX power\n", sc->sc_dev.dv_xname);
+
+       splx(s);
 }
 
 /*

Reply via email to