iwlwifi: only check for association id when associating with AP
authorReinette Chatre <reinette.chatre@intel.com>
Thu, 14 Feb 2008 18:40:28 +0000 (10:40 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 15 Feb 2008 18:44:19 +0000 (13:44 -0500)
There is no association process in IBSS mode - so testing the
association id is not needed.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
CC: Richard Scherping <richard@scherping.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl4965-base.c

index 03a0756f7ef4ff341fb62381a15639f4a7d27371..40b71bc2c4a4c3eea35c5896d4293e20b4f5034d 100644 (file)
@@ -2812,7 +2812,8 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv,
 #endif
 
        /* drop all data frame if we are not associated */
-       if ((!iwl3945_is_associated(priv) || !priv->assoc_id) &&
+       if ((!iwl3945_is_associated(priv) ||
+            ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && !priv->assoc_id)) &&
            ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)) {
                IWL_DEBUG_DROP("Dropping - !iwl3945_is_associated\n");
                goto drop_unlock;
index 2c6756261856761d5d66d7e4acab797fe0cd21cd..a23d4798653b716a3bad6e455797df70f90ab801 100644 (file)
@@ -2940,7 +2940,7 @@ static int iwl4965_tx_skb(struct iwl4965_priv *priv,
        /* drop all data frame if we are not associated */
        if (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) &&
           (!iwl4965_is_associated(priv) ||
-           !priv->assoc_id ||
+           ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && !priv->assoc_id) ||
            !priv->assoc_station_added)) {
                IWL_DEBUG_DROP("Dropping - !iwl4965_is_associated\n");
                goto drop_unlock;