diff options
author | David S. Miller <davem@davemloft.net> | 2009-08-09 23:47:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-09 23:47:39 -0400 |
commit | 819ae6a389d4acfab9a7bb874fa1977aa464d14b (patch) | |
tree | e4e562be1a6b7fa8b318107effb358d187dc6b0a /drivers/net | |
parent | 0d502d8267ebab9ae4b5b4c065d20196d6069f52 (diff) | |
parent | dd1f57ecaf9688efa69d982652ecfa3e64f1fa55 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/hostcmd.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 31 |
3 files changed, 22 insertions, 15 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 44c29b3f6728..6dcac73b4d29 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -6226,7 +6226,7 @@ static void ipw_add_scan_channels(struct ipw_priv *priv, | |||
6226 | }; | 6226 | }; |
6227 | 6227 | ||
6228 | u8 channel; | 6228 | u8 channel; |
6229 | while (channel_index < IPW_SCAN_CHANNELS) { | 6229 | while (channel_index < IPW_SCAN_CHANNELS - 1) { |
6230 | channel = | 6230 | channel = |
6231 | priv->speed_scan[priv->speed_scan_pos]; | 6231 | priv->speed_scan[priv->speed_scan_pos]; |
6232 | if (channel == 0) { | 6232 | if (channel == 0) { |
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h index 0a2e29140add..c8a1998d4744 100644 --- a/drivers/net/wireless/libertas/hostcmd.h +++ b/drivers/net/wireless/libertas/hostcmd.h | |||
@@ -56,8 +56,8 @@ struct rxpd { | |||
56 | u8 bss_type; | 56 | u8 bss_type; |
57 | /* BSS number */ | 57 | /* BSS number */ |
58 | u8 bss_num; | 58 | u8 bss_num; |
59 | } bss; | 59 | } __attribute__ ((packed)) bss; |
60 | } u; | 60 | } __attribute__ ((packed)) u; |
61 | 61 | ||
62 | /* SNR */ | 62 | /* SNR */ |
63 | u8 snr; | 63 | u8 snr; |
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index a263d5c84c08..83967afe0821 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -261,7 +261,7 @@ struct mwl8k_vif { | |||
261 | */ | 261 | */ |
262 | }; | 262 | }; |
263 | 263 | ||
264 | #define MWL8K_VIF(_vif) (struct mwl8k_vif *)(&((_vif)->drv_priv)) | 264 | #define MWL8K_VIF(_vif) ((struct mwl8k_vif *)&((_vif)->drv_priv)) |
265 | 265 | ||
266 | static const struct ieee80211_channel mwl8k_channels[] = { | 266 | static const struct ieee80211_channel mwl8k_channels[] = { |
267 | { .center_freq = 2412, .hw_value = 1, }, | 267 | { .center_freq = 2412, .hw_value = 1, }, |
@@ -1012,6 +1012,8 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit) | |||
1012 | rmb(); | 1012 | rmb(); |
1013 | 1013 | ||
1014 | skb = rxq->rx_skb[rxq->rx_head]; | 1014 | skb = rxq->rx_skb[rxq->rx_head]; |
1015 | if (skb == NULL) | ||
1016 | break; | ||
1015 | rxq->rx_skb[rxq->rx_head] = NULL; | 1017 | rxq->rx_skb[rxq->rx_head] = NULL; |
1016 | 1018 | ||
1017 | rxq->rx_head = (rxq->rx_head + 1) % MWL8K_RX_DESCS; | 1019 | rxq->rx_head = (rxq->rx_head + 1) % MWL8K_RX_DESCS; |
@@ -1591,6 +1593,9 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd) | |||
1591 | timeout = wait_for_completion_timeout(&cmd_wait, | 1593 | timeout = wait_for_completion_timeout(&cmd_wait, |
1592 | msecs_to_jiffies(MWL8K_CMD_TIMEOUT_MS)); | 1594 | msecs_to_jiffies(MWL8K_CMD_TIMEOUT_MS)); |
1593 | 1595 | ||
1596 | pci_unmap_single(priv->pdev, dma_addr, dma_size, | ||
1597 | PCI_DMA_BIDIRECTIONAL); | ||
1598 | |||
1594 | result = &cmd->result; | 1599 | result = &cmd->result; |
1595 | if (!timeout) { | 1600 | if (!timeout) { |
1596 | spin_lock_irq(&priv->fw_lock); | 1601 | spin_lock_irq(&priv->fw_lock); |
@@ -1610,8 +1615,6 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd) | |||
1610 | *result); | 1615 | *result); |
1611 | } | 1616 | } |
1612 | 1617 | ||
1613 | pci_unmap_single(priv->pdev, dma_addr, dma_size, | ||
1614 | PCI_DMA_BIDIRECTIONAL); | ||
1615 | return rc; | 1618 | return rc; |
1616 | } | 1619 | } |
1617 | 1620 | ||
@@ -1654,18 +1657,18 @@ static int mwl8k_cmd_get_hw_spec(struct ieee80211_hw *hw) | |||
1654 | memset(cmd->perm_addr, 0xff, sizeof(cmd->perm_addr)); | 1657 | memset(cmd->perm_addr, 0xff, sizeof(cmd->perm_addr)); |
1655 | cmd->ps_cookie = cpu_to_le32(priv->cookie_dma); | 1658 | cmd->ps_cookie = cpu_to_le32(priv->cookie_dma); |
1656 | cmd->rx_queue_ptr = cpu_to_le32(priv->rxq[0].rx_desc_dma); | 1659 | cmd->rx_queue_ptr = cpu_to_le32(priv->rxq[0].rx_desc_dma); |
1657 | cmd->num_tx_queues = MWL8K_TX_QUEUES; | 1660 | cmd->num_tx_queues = cpu_to_le32(MWL8K_TX_QUEUES); |
1658 | for (i = 0; i < MWL8K_TX_QUEUES; i++) | 1661 | for (i = 0; i < MWL8K_TX_QUEUES; i++) |
1659 | cmd->tx_queue_ptrs[i] = cpu_to_le32(priv->txq[i].tx_desc_dma); | 1662 | cmd->tx_queue_ptrs[i] = cpu_to_le32(priv->txq[i].tx_desc_dma); |
1660 | cmd->num_tx_desc_per_queue = MWL8K_TX_DESCS; | 1663 | cmd->num_tx_desc_per_queue = cpu_to_le32(MWL8K_TX_DESCS); |
1661 | cmd->total_rx_desc = MWL8K_RX_DESCS; | 1664 | cmd->total_rx_desc = cpu_to_le32(MWL8K_RX_DESCS); |
1662 | 1665 | ||
1663 | rc = mwl8k_post_cmd(hw, &cmd->header); | 1666 | rc = mwl8k_post_cmd(hw, &cmd->header); |
1664 | 1667 | ||
1665 | if (!rc) { | 1668 | if (!rc) { |
1666 | SET_IEEE80211_PERM_ADDR(hw, cmd->perm_addr); | 1669 | SET_IEEE80211_PERM_ADDR(hw, cmd->perm_addr); |
1667 | priv->num_mcaddrs = le16_to_cpu(cmd->num_mcaddrs); | 1670 | priv->num_mcaddrs = le16_to_cpu(cmd->num_mcaddrs); |
1668 | priv->fw_rev = cmd->fw_rev; | 1671 | priv->fw_rev = le32_to_cpu(cmd->fw_rev); |
1669 | priv->hw_rev = cmd->hw_rev; | 1672 | priv->hw_rev = cmd->hw_rev; |
1670 | priv->region_code = le16_to_cpu(cmd->region_code); | 1673 | priv->region_code = le16_to_cpu(cmd->region_code); |
1671 | } | 1674 | } |
@@ -3216,15 +3219,19 @@ static int mwl8k_configure_filter_wt(struct work_struct *wt) | |||
3216 | struct dev_addr_list *mclist = worker->mclist; | 3219 | struct dev_addr_list *mclist = worker->mclist; |
3217 | 3220 | ||
3218 | struct mwl8k_priv *priv = hw->priv; | 3221 | struct mwl8k_priv *priv = hw->priv; |
3219 | struct mwl8k_vif *mv_vif; | ||
3220 | int rc = 0; | 3222 | int rc = 0; |
3221 | 3223 | ||
3222 | if (changed_flags & FIF_BCN_PRBRESP_PROMISC) { | 3224 | if (changed_flags & FIF_BCN_PRBRESP_PROMISC) { |
3223 | if (*total_flags & FIF_BCN_PRBRESP_PROMISC) | 3225 | if (*total_flags & FIF_BCN_PRBRESP_PROMISC) |
3224 | rc = mwl8k_cmd_set_pre_scan(hw); | 3226 | rc = mwl8k_cmd_set_pre_scan(hw); |
3225 | else { | 3227 | else { |
3226 | mv_vif = MWL8K_VIF(priv->vif); | 3228 | u8 *bssid; |
3227 | rc = mwl8k_cmd_set_post_scan(hw, mv_vif->bssid); | 3229 | |
3230 | bssid = "\x00\x00\x00\x00\x00\x00"; | ||
3231 | if (priv->vif != NULL) | ||
3232 | bssid = MWL8K_VIF(priv->vif)->bssid; | ||
3233 | |||
3234 | rc = mwl8k_cmd_set_post_scan(hw, bssid); | ||
3228 | } | 3235 | } |
3229 | } | 3236 | } |
3230 | 3237 | ||
@@ -3726,6 +3733,8 @@ static void __devexit mwl8k_remove(struct pci_dev *pdev) | |||
3726 | 3733 | ||
3727 | ieee80211_stop_queues(hw); | 3734 | ieee80211_stop_queues(hw); |
3728 | 3735 | ||
3736 | ieee80211_unregister_hw(hw); | ||
3737 | |||
3729 | /* Remove tx reclaim tasklet */ | 3738 | /* Remove tx reclaim tasklet */ |
3730 | tasklet_kill(&priv->tx_reclaim_task); | 3739 | tasklet_kill(&priv->tx_reclaim_task); |
3731 | 3740 | ||
@@ -3739,8 +3748,6 @@ static void __devexit mwl8k_remove(struct pci_dev *pdev) | |||
3739 | for (i = 0; i < MWL8K_TX_QUEUES; i++) | 3748 | for (i = 0; i < MWL8K_TX_QUEUES; i++) |
3740 | mwl8k_txq_reclaim(hw, i, 1); | 3749 | mwl8k_txq_reclaim(hw, i, 1); |
3741 | 3750 | ||
3742 | ieee80211_unregister_hw(hw); | ||
3743 | |||
3744 | for (i = 0; i < MWL8K_TX_QUEUES; i++) | 3751 | for (i = 0; i < MWL8K_TX_QUEUES; i++) |
3745 | mwl8k_txq_deinit(hw, i); | 3752 | mwl8k_txq_deinit(hw, i); |
3746 | 3753 | ||