Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 May 2017 06:21:03 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r318225 - head/sys/dev/iwm
Message-ID:  <201705120621.v4C6L3gi066280@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Fri May 12 06:21:03 2017
New Revision: 318225
URL: https://svnweb.freebsd.org/changeset/base/318225

Log:
  [iwm] Already call iwm_mvm_power_update_mac() during SCAN<->AUTH paths.
  
  * Otherwise we would never update powersaving settings until we complete
    an association, after the first authentication attempt.
  
  * This corresponds to what Linux iwlwifi seems to do.
  
  Obtained from:	dragonflybsd.git aa128dc02a17c2e616232ef0fa997121e969c995

Modified:
  head/sys/dev/iwm/if_iwm.c

Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c	Fri May 12 06:16:11 2017	(r318224)
+++ head/sys/dev/iwm/if_iwm.c	Fri May 12 06:21:03 2017	(r318225)
@@ -4029,12 +4029,6 @@ iwm_auth(struct ieee80211vap *vap, struc
 			    "%s: failed to add MAC\n", __func__);
 			goto out;
 		}
-		if ((error = iwm_mvm_power_update_mac(sc)) != 0) {
-			device_printf(sc->sc_dev,
-			    "%s: failed to update power management\n",
-			    __func__);
-			goto out;
-		}
 	}
 
 	if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0],
@@ -4050,6 +4044,12 @@ iwm_auth(struct ieee80211vap *vap, struc
 		    "%s: binding update cmd\n", __func__);
 		goto out;
 	}
+	if ((error = iwm_mvm_power_update_mac(sc)) != 0) {
+		device_printf(sc->sc_dev,
+		    "%s: failed to update power management\n",
+		    __func__);
+		goto out;
+	}
 	if ((error = iwm_mvm_add_sta(sc, in)) != 0) {
 		device_printf(sc->sc_dev,
 		    "%s: failed to add sta\n", __func__);
@@ -4408,6 +4408,12 @@ iwm_newstate(struct ieee80211vap *vap, e
                                     __func__, error);
                         }
 			ivp->phy_ctxt = NULL;
+			error = iwm_mvm_power_update_mac(sc);
+			if (error != 0) {
+				device_printf(sc->sc_dev,
+				    "%s: failed to update power management\n",
+				    __func__);
+			}
 			IWM_UNLOCK(sc);
 			IEEE80211_LOCK(ic);
 			return myerr;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705120621.v4C6L3gi066280>