From owner-svn-src-all@freebsd.org Fri May 12 06:30:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E958D69FB5; Fri, 12 May 2017 06:30:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5B3F1BE1; Fri, 12 May 2017 06:30:07 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6U6uG069573; Fri, 12 May 2017 06:30:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6U6F9069570; Fri, 12 May 2017 06:30:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120630.v4C6U6F9069570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318226 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:30:08 -0000 Author: adrian Date: Fri May 12 06:30:06 2017 New Revision: 318226 URL: https://svnweb.freebsd.org/changeset/base/318226 Log: [iwm] Switch arguments from iwm_node* to iwm_vap* in if_iwm_power.c. * Power management handling is per-vap, not per-node, so we should pass the iwm_vap in these arguments. Obtained from: dragonflybsd.git 62a4e7957a736b4de38938b02fa7eb9b45bc5d0d Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_power.c head/sys/dev/iwm/if_iwm_power.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:21:03 2017 (r318225) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:30:06 2017 (r318226) @@ -4462,7 +4462,7 @@ iwm_newstate(struct ieee80211vap *vap, e "%s: failed to update MAC: %d\n", __func__, error); } - iwm_mvm_enable_beacon_filter(sc, in); + iwm_mvm_enable_beacon_filter(sc, ivp); iwm_mvm_power_update_mac(sc); iwm_mvm_update_quotas(sc, ivp); iwm_setrates(sc, in); Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:21:03 2017 (r318225) +++ head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:30:06 2017 (r318226) @@ -201,7 +201,7 @@ iwm_mvm_beacon_filter_send_cmd(struct iw static void iwm_mvm_beacon_filter_set_cqm_params(struct iwm_softc *sc, - struct iwm_node *in, struct iwm_beacon_filter_cmd *cmd) + struct iwm_vap *ivp, struct iwm_beacon_filter_cmd *cmd) { cmd->ba_enable_beacon_abort = htole32(sc->sc_bf.ba_enabled); } @@ -278,15 +278,14 @@ iwm_mvm_power_config_skip_dtim(struct iw } static void -iwm_mvm_power_build_cmd(struct iwm_softc *sc, struct iwm_node *in, +iwm_mvm_power_build_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, struct iwm_mac_power_cmd *cmd) { - struct ieee80211_node *ni = &in->in_ni; + struct ieee80211_node *ni = ivp->iv_vap.iv_bss; int dtimper, dtimper_msec; int keep_alive; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct iwm_vap *ivp = IWM_VAP(vap); cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); @@ -319,11 +318,11 @@ iwm_mvm_power_build_cmd(struct iwm_softc } static int -iwm_mvm_power_send_cmd(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_power_send_cmd(struct iwm_softc *sc, struct iwm_vap *ivp) { struct iwm_mac_power_cmd cmd = {}; - iwm_mvm_power_build_cmd(sc, in, &cmd); + iwm_mvm_power_build_cmd(sc, ivp, &cmd); iwm_mvm_power_log(sc, &cmd); return iwm_mvm_send_cmd_pdu(sc, IWM_MAC_PM_POWER_TABLE, 0, @@ -331,12 +330,12 @@ iwm_mvm_power_send_cmd(struct iwm_softc } static int -_iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in, +_iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_vap *ivp, struct iwm_beacon_filter_cmd *cmd) { int ret; - iwm_mvm_beacon_filter_set_cqm_params(sc, in, cmd); + iwm_mvm_beacon_filter_set_cqm_params(sc, ivp, cmd); ret = iwm_mvm_beacon_filter_send_cmd(sc, cmd); if (!ret) @@ -346,14 +345,14 @@ _iwm_mvm_enable_beacon_filter(struct iwm } int -iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_vap *ivp) { struct iwm_beacon_filter_cmd cmd = { IWM_BF_CMD_CONFIG_DEFAULTS, .bf_enable_beacon_filter = htole32(1), }; - return _iwm_mvm_enable_beacon_filter(sc, in, &cmd); + return _iwm_mvm_enable_beacon_filter(sc, ivp, &cmd); } int @@ -398,7 +397,7 @@ iwm_mvm_power_set_ps(struct iwm_softc *s } static int -iwm_mvm_power_set_ba(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_power_set_ba(struct iwm_softc *sc, struct iwm_vap *ivp) { struct iwm_beacon_filter_cmd cmd = { IWM_BF_CMD_CONFIG_DEFAULTS, @@ -410,7 +409,7 @@ iwm_mvm_power_set_ba(struct iwm_softc *s sc->sc_bf.ba_enabled = !sc->sc_ps_disabled; - return _iwm_mvm_enable_beacon_filter(sc, in, &cmd); + return _iwm_mvm_enable_beacon_filter(sc, ivp, &cmd); } int @@ -424,7 +423,7 @@ iwm_mvm_power_update_ps(struct iwm_softc return ret; if (vap != NULL) - return iwm_mvm_power_set_ba(sc, IWM_NODE(vap->iv_bss)); + return iwm_mvm_power_set_ba(sc, IWM_VAP(vap)); return 0; } @@ -440,13 +439,13 @@ iwm_mvm_power_update_mac(struct iwm_soft return ret; if (vap != NULL) { - ret = iwm_mvm_power_send_cmd(sc, IWM_NODE(vap->iv_bss)); + ret = iwm_mvm_power_send_cmd(sc, IWM_VAP(vap)); if (ret) return ret; } if (vap != NULL) - return iwm_mvm_power_set_ba(sc, IWM_NODE(vap->iv_bss)); + return iwm_mvm_power_set_ba(sc, IWM_VAP(vap)); return 0; } Modified: head/sys/dev/iwm/if_iwm_power.h ============================================================================== --- head/sys/dev/iwm/if_iwm_power.h Fri May 12 06:21:03 2017 (r318225) +++ head/sys/dev/iwm/if_iwm_power.h Fri May 12 06:30:06 2017 (r318226) @@ -94,7 +94,7 @@ extern int iwm_mvm_power_update_device(s extern int iwm_mvm_power_update_mac(struct iwm_softc *sc); extern int iwm_mvm_power_update_ps(struct iwm_softc *sc); extern int iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, - struct iwm_node *in); + struct iwm_vap *ivp); extern int iwm_mvm_disable_beacon_filter(struct iwm_softc *sc); #endif /* __IF_IWM_POWER_H__ */