]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/iwlwifi/iwl3945-base.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6] / drivers / net / wireless / iwlwifi / iwl3945-base.c
index 74b1099ff8aa27506aec01d3f97f0b6ad5832088..40b71bc2c4a4c3eea35c5896d4293e20b4f5034d 100644 (file)
@@ -1586,7 +1586,7 @@ static inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv)
  */
 int iwl3945_eeprom_init(struct iwl3945_priv *priv)
 {
-       __le16 *e = (__le16 *)&priv->eeprom;
+       u16 *e = (u16 *)&priv->eeprom;
        u32 gp = iwl3945_read32(priv, CSR_EEPROM_GP);
        u32 r;
        int sz = sizeof(priv->eeprom);
@@ -1629,7 +1629,7 @@ int iwl3945_eeprom_init(struct iwl3945_priv *priv)
                        IWL_ERROR("Time out reading EEPROM[%d]", addr);
                        return -ETIMEDOUT;
                }
-               e[addr / 2] = cpu_to_le16(r >> 16);
+               e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16));
        }
 
        return 0;
@@ -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;