diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 5ee1ad69898b..40b71bc2c4a4 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -687,6 +687,12 @@ static int iwl3945_enqueue_hcmd(struct iwl3945_priv *priv, struct iwl3945_host_c | |||
687 | BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) && | 687 | BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) && |
688 | !(cmd->meta.flags & CMD_SIZE_HUGE)); | 688 | !(cmd->meta.flags & CMD_SIZE_HUGE)); |
689 | 689 | ||
690 | |||
691 | if (iwl3945_is_rfkill(priv)) { | ||
692 | IWL_DEBUG_INFO("Not sending command - RF KILL"); | ||
693 | return -EIO; | ||
694 | } | ||
695 | |||
690 | if (iwl3945_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) { | 696 | if (iwl3945_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) { |
691 | IWL_ERROR("No space for Tx\n"); | 697 | IWL_ERROR("No space for Tx\n"); |
692 | return -ENOSPC; | 698 | return -ENOSPC; |
@@ -1580,7 +1586,7 @@ static inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv) | |||
1580 | */ | 1586 | */ |
1581 | int iwl3945_eeprom_init(struct iwl3945_priv *priv) | 1587 | int iwl3945_eeprom_init(struct iwl3945_priv *priv) |
1582 | { | 1588 | { |
1583 | __le16 *e = (__le16 *)&priv->eeprom; | 1589 | u16 *e = (u16 *)&priv->eeprom; |
1584 | u32 gp = iwl3945_read32(priv, CSR_EEPROM_GP); | 1590 | u32 gp = iwl3945_read32(priv, CSR_EEPROM_GP); |
1585 | u32 r; | 1591 | u32 r; |
1586 | int sz = sizeof(priv->eeprom); | 1592 | int sz = sizeof(priv->eeprom); |
@@ -1623,7 +1629,7 @@ int iwl3945_eeprom_init(struct iwl3945_priv *priv) | |||
1623 | IWL_ERROR("Time out reading EEPROM[%d]", addr); | 1629 | IWL_ERROR("Time out reading EEPROM[%d]", addr); |
1624 | return -ETIMEDOUT; | 1630 | return -ETIMEDOUT; |
1625 | } | 1631 | } |
1626 | e[addr / 2] = cpu_to_le16(r >> 16); | 1632 | e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16)); |
1627 | } | 1633 | } |
1628 | 1634 | ||
1629 | return 0; | 1635 | return 0; |
@@ -2806,7 +2812,8 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv, | |||
2806 | #endif | 2812 | #endif |
2807 | 2813 | ||
2808 | /* drop all data frame if we are not associated */ | 2814 | /* drop all data frame if we are not associated */ |
2809 | if ((!iwl3945_is_associated(priv) || !priv->assoc_id) && | 2815 | if ((!iwl3945_is_associated(priv) || |
2816 | ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && !priv->assoc_id)) && | ||
2810 | ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)) { | 2817 | ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)) { |
2811 | IWL_DEBUG_DROP("Dropping - !iwl3945_is_associated\n"); | 2818 | IWL_DEBUG_DROP("Dropping - !iwl3945_is_associated\n"); |
2812 | goto drop_unlock; | 2819 | goto drop_unlock; |
@@ -4281,7 +4288,7 @@ static void iwl3945_rx_handle(struct iwl3945_priv *priv) | |||
4281 | int reclaim; | 4288 | int reclaim; |
4282 | unsigned long flags; | 4289 | unsigned long flags; |
4283 | u8 fill_rx = 0; | 4290 | u8 fill_rx = 0; |
4284 | u32 count = 0; | 4291 | u32 count = 8; |
4285 | 4292 | ||
4286 | /* uCode's read index (stored in shared DRAM) indicates the last Rx | 4293 | /* uCode's read index (stored in shared DRAM) indicates the last Rx |
4287 | * buffer that the driver may process (last buffer filled by ucode). */ | 4294 | * buffer that the driver may process (last buffer filled by ucode). */ |
@@ -6256,6 +6263,8 @@ static void __iwl3945_down(struct iwl3945_priv *priv) | |||
6256 | STATUS_RF_KILL_HW | | 6263 | STATUS_RF_KILL_HW | |
6257 | test_bit(STATUS_RF_KILL_SW, &priv->status) << | 6264 | test_bit(STATUS_RF_KILL_SW, &priv->status) << |
6258 | STATUS_RF_KILL_SW | | 6265 | STATUS_RF_KILL_SW | |
6266 | test_bit(STATUS_GEO_CONFIGURED, &priv->status) << | ||
6267 | STATUS_GEO_CONFIGURED | | ||
6259 | test_bit(STATUS_IN_SUSPEND, &priv->status) << | 6268 | test_bit(STATUS_IN_SUSPEND, &priv->status) << |
6260 | STATUS_IN_SUSPEND; | 6269 | STATUS_IN_SUSPEND; |
6261 | goto exit; | 6270 | goto exit; |
@@ -6267,6 +6276,8 @@ static void __iwl3945_down(struct iwl3945_priv *priv) | |||
6267 | STATUS_RF_KILL_HW | | 6276 | STATUS_RF_KILL_HW | |
6268 | test_bit(STATUS_RF_KILL_SW, &priv->status) << | 6277 | test_bit(STATUS_RF_KILL_SW, &priv->status) << |
6269 | STATUS_RF_KILL_SW | | 6278 | STATUS_RF_KILL_SW | |
6279 | test_bit(STATUS_GEO_CONFIGURED, &priv->status) << | ||
6280 | STATUS_GEO_CONFIGURED | | ||
6270 | test_bit(STATUS_IN_SUSPEND, &priv->status) << | 6281 | test_bit(STATUS_IN_SUSPEND, &priv->status) << |
6271 | STATUS_IN_SUSPEND | | 6282 | STATUS_IN_SUSPEND | |
6272 | test_bit(STATUS_FW_ERROR, &priv->status) << | 6283 | test_bit(STATUS_FW_ERROR, &priv->status) << |