diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-19 10:52:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-19 10:52:45 -0500 |
commit | 07ce198a1eb3431d04a6d59ea9fb7b71f21e33b1 (patch) | |
tree | fe6e6208bdcdfb7bbb0c81923efcb75bf73a299b /drivers/net/wireless/iwlwifi | |
parent | 4bc87e62775052aac0be7574d5f84ff06f61c6b4 (diff) | |
parent | a442585952f137bd4cdb1f2f3166e4157d383b82 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (60 commits)
[NIU]: Bump driver version and release date.
[NIU]: Fix BMAC alternate MAC address indexing.
net: fix kernel-doc warnings in header files
[IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route.
[IPV6]: dst_entry leak in ip4ip6_err. (resend)
bluetooth: do not move child device other than rfcomm
bluetooth: put hci dev after del conn
[NET]: Elminate spurious print_mac() calls.
[BLUETOOTH] hci_sysfs.c: Kill build warning.
[NET]: Remove MAC_FMT
net/8021q/vlan_dev.c: Use print_mac.
[XFRM]: Fix ordering issue in xfrm_dst_hash_transfer().
[BLUETOOTH] net/bluetooth/hci_core.c: Use time_* macros
[IPV6]: Fix hardcoded removing of old module code
[NETLABEL]: Move some initialization code into __init section.
[NETLABEL]: Shrink the genl-ops registration code.
[AX25] ax25_out: check skb for NULL in ax25_kick()
[TCP]: Fix tcp_v4_send_synack() comment
[IPV4]: fix alignment of IP-Config output
Documentation: fix tcp.txt
...
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 17 |
2 files changed, 28 insertions, 8 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) << |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index f423241b9567..a23d4798653b 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -692,6 +692,11 @@ static int iwl4965_enqueue_hcmd(struct iwl4965_priv *priv, struct iwl4965_host_c | |||
692 | BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) && | 692 | BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) && |
693 | !(cmd->meta.flags & CMD_SIZE_HUGE)); | 693 | !(cmd->meta.flags & CMD_SIZE_HUGE)); |
694 | 694 | ||
695 | if (iwl4965_is_rfkill(priv)) { | ||
696 | IWL_DEBUG_INFO("Not sending command - RF KILL"); | ||
697 | return -EIO; | ||
698 | } | ||
699 | |||
695 | if (iwl4965_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) { | 700 | if (iwl4965_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) { |
696 | IWL_ERROR("No space for Tx\n"); | 701 | IWL_ERROR("No space for Tx\n"); |
697 | return -ENOSPC; | 702 | return -ENOSPC; |
@@ -1654,7 +1659,7 @@ static inline void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv) | |||
1654 | */ | 1659 | */ |
1655 | int iwl4965_eeprom_init(struct iwl4965_priv *priv) | 1660 | int iwl4965_eeprom_init(struct iwl4965_priv *priv) |
1656 | { | 1661 | { |
1657 | __le16 *e = (__le16 *)&priv->eeprom; | 1662 | u16 *e = (u16 *)&priv->eeprom; |
1658 | u32 gp = iwl4965_read32(priv, CSR_EEPROM_GP); | 1663 | u32 gp = iwl4965_read32(priv, CSR_EEPROM_GP); |
1659 | u32 r; | 1664 | u32 r; |
1660 | int sz = sizeof(priv->eeprom); | 1665 | int sz = sizeof(priv->eeprom); |
@@ -1698,7 +1703,7 @@ int iwl4965_eeprom_init(struct iwl4965_priv *priv) | |||
1698 | rc = -ETIMEDOUT; | 1703 | rc = -ETIMEDOUT; |
1699 | goto done; | 1704 | goto done; |
1700 | } | 1705 | } |
1701 | e[addr / 2] = cpu_to_le16(r >> 16); | 1706 | e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16)); |
1702 | } | 1707 | } |
1703 | rc = 0; | 1708 | rc = 0; |
1704 | 1709 | ||
@@ -2935,7 +2940,7 @@ static int iwl4965_tx_skb(struct iwl4965_priv *priv, | |||
2935 | /* drop all data frame if we are not associated */ | 2940 | /* drop all data frame if we are not associated */ |
2936 | if (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) && | 2941 | if (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) && |
2937 | (!iwl4965_is_associated(priv) || | 2942 | (!iwl4965_is_associated(priv) || |
2938 | !priv->assoc_id || | 2943 | ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && !priv->assoc_id) || |
2939 | !priv->assoc_station_added)) { | 2944 | !priv->assoc_station_added)) { |
2940 | IWL_DEBUG_DROP("Dropping - !iwl4965_is_associated\n"); | 2945 | IWL_DEBUG_DROP("Dropping - !iwl4965_is_associated\n"); |
2941 | goto drop_unlock; | 2946 | goto drop_unlock; |
@@ -4664,7 +4669,7 @@ static void iwl4965_rx_handle(struct iwl4965_priv *priv) | |||
4664 | int reclaim; | 4669 | int reclaim; |
4665 | unsigned long flags; | 4670 | unsigned long flags; |
4666 | u8 fill_rx = 0; | 4671 | u8 fill_rx = 0; |
4667 | u32 count = 0; | 4672 | u32 count = 8; |
4668 | 4673 | ||
4669 | /* uCode's read index (stored in shared DRAM) indicates the last Rx | 4674 | /* uCode's read index (stored in shared DRAM) indicates the last Rx |
4670 | * buffer that the driver may process (last buffer filled by ucode). */ | 4675 | * buffer that the driver may process (last buffer filled by ucode). */ |
@@ -6680,6 +6685,8 @@ static void __iwl4965_down(struct iwl4965_priv *priv) | |||
6680 | STATUS_RF_KILL_HW | | 6685 | STATUS_RF_KILL_HW | |
6681 | test_bit(STATUS_RF_KILL_SW, &priv->status) << | 6686 | test_bit(STATUS_RF_KILL_SW, &priv->status) << |
6682 | STATUS_RF_KILL_SW | | 6687 | STATUS_RF_KILL_SW | |
6688 | test_bit(STATUS_GEO_CONFIGURED, &priv->status) << | ||
6689 | STATUS_GEO_CONFIGURED | | ||
6683 | test_bit(STATUS_IN_SUSPEND, &priv->status) << | 6690 | test_bit(STATUS_IN_SUSPEND, &priv->status) << |
6684 | STATUS_IN_SUSPEND; | 6691 | STATUS_IN_SUSPEND; |
6685 | goto exit; | 6692 | goto exit; |
@@ -6691,6 +6698,8 @@ static void __iwl4965_down(struct iwl4965_priv *priv) | |||
6691 | STATUS_RF_KILL_HW | | 6698 | STATUS_RF_KILL_HW | |
6692 | test_bit(STATUS_RF_KILL_SW, &priv->status) << | 6699 | test_bit(STATUS_RF_KILL_SW, &priv->status) << |
6693 | STATUS_RF_KILL_SW | | 6700 | STATUS_RF_KILL_SW | |
6701 | test_bit(STATUS_GEO_CONFIGURED, &priv->status) << | ||
6702 | STATUS_GEO_CONFIGURED | | ||
6694 | test_bit(STATUS_IN_SUSPEND, &priv->status) << | 6703 | test_bit(STATUS_IN_SUSPEND, &priv->status) << |
6695 | STATUS_IN_SUSPEND | | 6704 | STATUS_IN_SUSPEND | |
6696 | test_bit(STATUS_FW_ERROR, &priv->status) << | 6705 | test_bit(STATUS_FW_ERROR, &priv->status) << |