linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emmanuel Grumbach <egrumbach@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 54/62] iwlwifi: mvm: clean up iwl_mvm_bss_info_changed_ap_ibss
Date: Mon,  3 Feb 2014 22:58:00 +0200	[thread overview]
Message-ID: <1391461088-8082-54-git-send-email-egrumbach@gmail.com> (raw)
In-Reply-To: <CANUX_P2BFLVRL-DFsTWA56zLJsRcn_dZhVdCChaQs2ZLWiBv3g@mail.gmail.com>

From: Johannes Berg <johannes.berg@intel.com>

Remove the enum abuse (using an enum to store a set of values),
the unneeded ret variable and unnecessary if nesting.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/mvm/mac80211.c |   20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 9d9a2d0..3ef7d78 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -1397,26 +1397,20 @@ iwl_mvm_bss_info_changed_ap_ibss(struct iwl_mvm *mvm,
 				 u32 changes)
 {
 	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
-	enum ieee80211_bss_change ht_change = BSS_CHANGED_ERP_CTS_PROT |
-					      BSS_CHANGED_HT |
-					      BSS_CHANGED_BANDWIDTH;
-	int ret;
 
 	/* Changes will be applied when the AP/IBSS is started */
 	if (!mvmvif->ap_ibss_active)
 		return;
 
-	if (changes & ht_change) {
-		ret = iwl_mvm_mac_ctxt_changed(mvm, vif);
-		if (ret)
-			IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr);
-	}
+	if (changes & (BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_HT |
+		       BSS_CHANGED_BANDWIDTH) &&
+	    iwl_mvm_mac_ctxt_changed(mvm, vif))
+		IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr);
 
 	/* Need to send a new beacon template to the FW */
-	if (changes & BSS_CHANGED_BEACON) {
-		if (iwl_mvm_mac_ctxt_beacon_changed(mvm, vif))
-			IWL_WARN(mvm, "Failed updating beacon data\n");
-	}
+	if (changes & BSS_CHANGED_BEACON &&
+	    iwl_mvm_mac_ctxt_beacon_changed(mvm, vif))
+		IWL_WARN(mvm, "Failed updating beacon data\n");
 }
 
 static void iwl_mvm_bss_info_changed(struct ieee80211_hw *hw,
-- 
1.7.9.5


  parent reply	other threads:[~2014-02-03 20:59 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03 20:56 pull request: iwlwifi-next 2014-02-03 Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 01/62] iwlwifi: mvm: implement AP/GO uAPSD support Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 02/62] iwlwifi: Add 8000 HW family support Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 03/62] iwlwifi: mvm: support NVM sections for family 8000 Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 04/62] iwlwifi: pcie: disable APMG configurations " Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 05/62] iwlwifi: pcie: change CSR reset in " Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 06/62] iwlwifi: pcie: Disable L0S exit timer for 8000 HW family Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 07/62] iwlwifi: pcie: fix secure section / dual cpu firmware loading Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 08/62] iwlwifi: pcie: make FH debugfs file code easier to understand Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 09/62] iwlwifi: 7000: warn about old firmware Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 10/62] iwlwifi: remove obsolete TODO Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 11/62] iwlwifi: mvm: provide helper to fetch the iwl_mvm_sta from sta_id Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 12/62] iwlwifi: mvm: check ARRAY_SIZE(mvm->fw_id_to_mac_id) = IWL_MVM_STATION_COUNT Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 13/62] iwlwifi: pcie: fix unused variable gcc warning Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 14/62] iwlwifi: mvm: don't stop sched scan in restart Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 15/62] iwlwifi: mvm: notify scan completed even if no fw_restart Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 16/62] iwlwifi: mvm: add low-latency framework Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 17/62] iwlwifi: mvm: disable powersave in low-latency Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 18/62] iwlwifi: mvm: reserve bandwidth for low-latency interface Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 19/62] iwlwifi: mvm: limit non-low-latency binding scheduling duration Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 20/62] iwlwifi: mvm: BT Coex - set low latency vif as primary Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 21/62] iwlwifi: mvm: BT Coex - change SMPS settings in AP mode Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 22/62] iwlwifi: mvm: change the format of the SRAM dump Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 23/62] iwlwifi: mvm: add basic bcast filtering implementation Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 24/62] iwlwifi: mvm: add predefined broadcast filter configuration Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 25/62] iwlwifi: mvm: add dest ip to bcast " Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 26/62] iwlwifi: mvm: add bcast_filtering debugfs entries Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 27/62] iwlwifi: mvm: allow to force reduced tx power from debugfs Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 28/62] iwlwifi: rs: use const u16 for throughput tables Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 29/62] iwlwifi: mvm: add vif type in debugfs output Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 30/62] iwlwifi: mvm: add the quota remainder to a data binding Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 31/62] iwlwifi: mvm: fix quota allocation Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 32/62] iwlwifi: pcie: retrieve and parse ACPI power limitations Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 33/62] iwlwifi: mvm: handle platform PCIe power limitation Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 34/62] iwlwifi: 7265: add power limit/tx backoff translation table Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 35/62] iwlwifi: add D0i3 references boiler plate Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 36/62] iwlwifi: add enter/exit D0i3 ops Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 37/62] iwlwifi: add very first D0i3 support Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 38/62] iwlwifi: mvm: add D0i3 power configurations Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 39/62] iwlwifi: mvm: configure vifs upon D0i3 entry/exit Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 40/62] iwlwifi: mvm: allow transport sleep when FW is operational Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 41/62] iwlwifi: mvm: add D0i3 ref/unref for scan Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 42/62] iwlwifi: mvm: add D0i3 ref/unref for ROC commands Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 43/62] iwlwifi: mvm: add D0i3 ref/unref when ap, ibss or p2p_cli vifs are running Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 44/62] iwlwifi: mvm: add d0i3_refs debugfs file Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 45/62] iwlwifi: mvm: configure WOWLAN_CONFIGURATION on D0i3 entry Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 46/62] iwlwifi: mvm: get status on D0i3 exit Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 47/62] iwlwifi: mvm: add debugfs hook to take an mvm ref Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 48/62] iwlwifi: mvm: remove unneeded calculations Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 49/62] iwlwifi: mvm: support multiple firmware sections Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 50/62] iwlwifi: fix potential buffer overrun in fw name Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 51/62] iwlwifi: mvm: abort scheduled scan on scan request Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 52/62] iwlwifi: fix kerneldoc format Emmanuel Grumbach
2014-02-03 20:57 ` [PATCH 53/62] iwlwifi: mvm: BT Coex - fix SYNC2SCO flags Emmanuel Grumbach
2014-02-03 20:58 ` Emmanuel Grumbach [this message]
2014-02-03 20:58 ` [PATCH 55/62] iwlwifi: mvm: remove duplicate assignment to ap_ibss_active Emmanuel Grumbach
2014-02-03 20:58 ` [PATCH 56/62] iwlwifi: mvm: clean up in power code Emmanuel Grumbach
2014-02-03 20:58 ` [PATCH 57/62] iwlwifi: mvm: don't look at power commmand to decide if power is enabled Emmanuel Grumbach
2014-02-03 20:58 ` [PATCH 58/62] iwlwifi: mvm: don't send the beacon filtering command from iterator Emmanuel Grumbach
2014-02-03 20:58 ` [PATCH 59/62] iwlwifi: mvm: store latest power command for debugfs read Emmanuel Grumbach
2014-02-03 20:58 ` [PATCH 60/62] iwlwifi: mvm: remove support for legacy power API Emmanuel Grumbach
2014-02-03 20:58 ` [PATCH 61/62] iwlwifi: mvm: remove iwl_mvm_power_mac_disable Emmanuel Grumbach
2014-02-03 20:58 ` [PATCH 62/62] iwlwifi: mvm: refactor power code Emmanuel Grumbach
2014-02-12 20:27 ` pull request: iwlwifi-next 2014-02-03 John W. Linville
2014-02-13  7:10   ` [Ilw] " Grumbach, Emmanuel
2014-02-13 14:44     ` John W. Linville
2014-02-13 14:48       ` Grumbach, Emmanuel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391461088-8082-54-git-send-email-egrumbach@gmail.com \
    --to=egrumbach@gmail.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).