iwlwifi: reduce beacon fill conditions
authorJohannes Berg <johannes.berg@intel.com>
Thu, 15 Jul 2010 12:59:07 +0000 (05:59 -0700)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 23 Jul 2010 15:42:40 +0000 (08:42 -0700)
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>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

index f8f8ea220ce13744003ff429c340869e50571d5a..9a78189c64f9c72b44635f3b7369e2c2866b1686 100644 (file)
@@ -292,9 +292,7 @@ static u32 iwl_fill_beacon_frame(struct iwl_priv *priv,
                                          struct ieee80211_hdr *hdr,
                                          int left)
 {
-       if (!iwl_is_associated(priv) || !priv->ibss_beacon ||
-           ((priv->iw_mode != NL80211_IFTYPE_ADHOC) &&
-            (priv->iw_mode != NL80211_IFTYPE_AP)))
+       if (!priv->ibss_beacon)
                return 0;
 
        if (priv->ibss_beacon->len > left)
index 8eb347106902c4d7bf5e603ffd02daaab12f9003..9a7209d075c86d19ff630119eefd07671aca7e46 100644 (file)
@@ -311,9 +311,7 @@ unsigned int iwl3945_fill_beacon_frame(struct iwl_priv *priv,
                                int left)
 {
 
-       if (!iwl_is_associated(priv) || !priv->ibss_beacon ||
-           ((priv->iw_mode != NL80211_IFTYPE_ADHOC) &&
-            (priv->iw_mode != NL80211_IFTYPE_AP)))
+       if (!iwl_is_associated(priv) || !priv->ibss_beacon)
                return 0;
 
        if (priv->ibss_beacon->len > left)