aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-07-15 08:59:07 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-07-23 11:42:40 -0400
commit6abbe554bab8ab908b3963577e14dc2e716fd485 (patch)
tree75503622b83a5cbfe3d64e5f4c41fe3ea9b4b354
parentc6fa17ed3fadaf056173c409c0877df428a152ec (diff)
iwlwifi: reduce beacon fill conditions
Since the ibss_beacon variable will only be filled in the appropriate modes, there's no reason to be checking the mode again. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index f8f8ea220ce1..9a78189c64f9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -292,9 +292,7 @@ static u32 iwl_fill_beacon_frame(struct iwl_priv *priv,
292 struct ieee80211_hdr *hdr, 292 struct ieee80211_hdr *hdr,
293 int left) 293 int left)
294{ 294{
295 if (!iwl_is_associated(priv) || !priv->ibss_beacon || 295 if (!priv->ibss_beacon)
296 ((priv->iw_mode != NL80211_IFTYPE_ADHOC) &&
297 (priv->iw_mode != NL80211_IFTYPE_AP)))
298 return 0; 296 return 0;
299 297
300 if (priv->ibss_beacon->len > left) 298 if (priv->ibss_beacon->len > left)
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 8eb347106902..9a7209d075c8 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -311,9 +311,7 @@ unsigned int iwl3945_fill_beacon_frame(struct iwl_priv *priv,
311 int left) 311 int left)
312{ 312{
313 313
314 if (!iwl_is_associated(priv) || !priv->ibss_beacon || 314 if (!iwl_is_associated(priv) || !priv->ibss_beacon)
315 ((priv->iw_mode != NL80211_IFTYPE_ADHOC) &&
316 (priv->iw_mode != NL80211_IFTYPE_AP)))
317 return 0; 315 return 0;
318 316
319 if (priv->ibss_beacon->len > left) 317 if (priv->ibss_beacon->len > left)