]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/iwlwifi/iwl4965-base.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6] / drivers / net / wireless / iwlwifi / iwl4965-base.c
index 14a11bd83e8262ac161a06ae861cae151708bb11..a23d4798653b716a3bad6e455797df70f90ab801 100644 (file)
@@ -1659,7 +1659,7 @@ static inline void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv)
  */
 int iwl4965_eeprom_init(struct iwl4965_priv *priv)
 {
-       __le16 *e = (__le16 *)&priv->eeprom;
+       u16 *e = (u16 *)&priv->eeprom;
        u32 gp = iwl4965_read32(priv, CSR_EEPROM_GP);
        u32 r;
        int sz = sizeof(priv->eeprom);
@@ -1703,7 +1703,7 @@ int iwl4965_eeprom_init(struct iwl4965_priv *priv)
                        rc = -ETIMEDOUT;
                        goto done;
                }
-               e[addr / 2] = cpu_to_le16(r >> 16);
+               e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16));
        }
        rc = 0;
 
@@ -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;