aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-02-12 20:47:15 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-12 20:47:15 -0500
commit37bed90094fdb1eea6e4afec6a200d4e60143e55 (patch)
tree4590075dbc03c13dd532a974f040f18a07b1d130 /drivers/net/wireless
parent071a0bc2ceace31266836801510879407a3701fa (diff)
parent1d7b33f77b2d8b0b1ee767e6f8f05cbd9d72cb7c (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: (32 commits) wimax: fix oops in wimax_dev_get_by_genl_info() when looking up non-wimax iface net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2 netxen: fix compile waring "label ‘set_32_bit_mask’ defined but not used" on IA64 platform bnx2: Update version to 1.9.2 and copyright. bnx2: Fix jumbo frames error handling. bnx2: Update 5709 firmware. bnx2: Update 5706/5708 firmware. 3c505: do not set pcb->data.raw beyond its size Documentation/connector/cn_test.c: don't use gfp_any() net: don't use in_atomic() in gfp_any() IRDA: cnt is off by 1 netxen: remove pcie workaround sun3: print when lance_open() fails qlge: bugfix: Add missing rx buf clean index on early exit. qlge: bugfix: Fix RX scaling values. qlge: bugfix: Fix TSO breakage. qlge: bugfix: Add missing dev_kfree_skb_any() call. qlge: bugfix: Add missing put_page() call. qlge: bugfix: Fix fatal error recovery hang. qlge: bugfix: Use netif_receive_skb() and vlan_hwaccel_receive_skb(). ...
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath5k/base.c85
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c15
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c15
-rw-r--r--drivers/net/wireless/zd1211rw/zd_rf.c1
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c1
5 files changed, 81 insertions, 36 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index a533ed60bb4d..1d77ee9d6e99 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -1098,6 +1098,42 @@ ath5k_hw_to_driver_rix(struct ath5k_softc *sc, int hw_rix)
1098* Buffers setup * 1098* Buffers setup *
1099\***************/ 1099\***************/
1100 1100
1101static
1102struct sk_buff *ath5k_rx_skb_alloc(struct ath5k_softc *sc, dma_addr_t *skb_addr)
1103{
1104 struct sk_buff *skb;
1105 unsigned int off;
1106
1107 /*
1108 * Allocate buffer with headroom_needed space for the
1109 * fake physical layer header at the start.
1110 */
1111 skb = dev_alloc_skb(sc->rxbufsize + sc->cachelsz - 1);
1112
1113 if (!skb) {
1114 ATH5K_ERR(sc, "can't alloc skbuff of size %u\n",
1115 sc->rxbufsize + sc->cachelsz - 1);
1116 return NULL;
1117 }
1118 /*
1119 * Cache-line-align. This is important (for the
1120 * 5210 at least) as not doing so causes bogus data
1121 * in rx'd frames.
1122 */
1123 off = ((unsigned long)skb->data) % sc->cachelsz;
1124 if (off != 0)
1125 skb_reserve(skb, sc->cachelsz - off);
1126
1127 *skb_addr = pci_map_single(sc->pdev,
1128 skb->data, sc->rxbufsize, PCI_DMA_FROMDEVICE);
1129 if (unlikely(pci_dma_mapping_error(sc->pdev, *skb_addr))) {
1130 ATH5K_ERR(sc, "%s: DMA mapping failed\n", __func__);
1131 dev_kfree_skb(skb);
1132 return NULL;
1133 }
1134 return skb;
1135}
1136
1101static int 1137static int
1102ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf) 1138ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
1103{ 1139{
@@ -1105,37 +1141,11 @@ ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
1105 struct sk_buff *skb = bf->skb; 1141 struct sk_buff *skb = bf->skb;
1106 struct ath5k_desc *ds; 1142 struct ath5k_desc *ds;
1107 1143
1108 if (likely(skb == NULL)) { 1144 if (!skb) {
1109 unsigned int off; 1145 skb = ath5k_rx_skb_alloc(sc, &bf->skbaddr);
1110 1146 if (!skb)
1111 /*
1112 * Allocate buffer with headroom_needed space for the
1113 * fake physical layer header at the start.
1114 */
1115 skb = dev_alloc_skb(sc->rxbufsize + sc->cachelsz - 1);
1116 if (unlikely(skb == NULL)) {
1117 ATH5K_ERR(sc, "can't alloc skbuff of size %u\n",
1118 sc->rxbufsize + sc->cachelsz - 1);
1119 return -ENOMEM; 1147 return -ENOMEM;
1120 }
1121 /*
1122 * Cache-line-align. This is important (for the
1123 * 5210 at least) as not doing so causes bogus data
1124 * in rx'd frames.
1125 */
1126 off = ((unsigned long)skb->data) % sc->cachelsz;
1127 if (off != 0)
1128 skb_reserve(skb, sc->cachelsz - off);
1129
1130 bf->skb = skb; 1148 bf->skb = skb;
1131 bf->skbaddr = pci_map_single(sc->pdev,
1132 skb->data, sc->rxbufsize, PCI_DMA_FROMDEVICE);
1133 if (unlikely(pci_dma_mapping_error(sc->pdev, bf->skbaddr))) {
1134 ATH5K_ERR(sc, "%s: DMA mapping failed\n", __func__);
1135 dev_kfree_skb(skb);
1136 bf->skb = NULL;
1137 return -ENOMEM;
1138 }
1139 } 1149 }
1140 1150
1141 /* 1151 /*
@@ -1664,7 +1674,8 @@ ath5k_tasklet_rx(unsigned long data)
1664{ 1674{
1665 struct ieee80211_rx_status rxs = {}; 1675 struct ieee80211_rx_status rxs = {};
1666 struct ath5k_rx_status rs = {}; 1676 struct ath5k_rx_status rs = {};
1667 struct sk_buff *skb; 1677 struct sk_buff *skb, *next_skb;
1678 dma_addr_t next_skb_addr;
1668 struct ath5k_softc *sc = (void *)data; 1679 struct ath5k_softc *sc = (void *)data;
1669 struct ath5k_buf *bf, *bf_last; 1680 struct ath5k_buf *bf, *bf_last;
1670 struct ath5k_desc *ds; 1681 struct ath5k_desc *ds;
@@ -1749,10 +1760,17 @@ ath5k_tasklet_rx(unsigned long data)
1749 goto next; 1760 goto next;
1750 } 1761 }
1751accept: 1762accept:
1763 next_skb = ath5k_rx_skb_alloc(sc, &next_skb_addr);
1764
1765 /*
1766 * If we can't replace bf->skb with a new skb under memory
1767 * pressure, just skip this packet
1768 */
1769 if (!next_skb)
1770 goto next;
1771
1752 pci_unmap_single(sc->pdev, bf->skbaddr, sc->rxbufsize, 1772 pci_unmap_single(sc->pdev, bf->skbaddr, sc->rxbufsize,
1753 PCI_DMA_FROMDEVICE); 1773 PCI_DMA_FROMDEVICE);
1754 bf->skb = NULL;
1755
1756 skb_put(skb, rs.rs_datalen); 1774 skb_put(skb, rs.rs_datalen);
1757 1775
1758 /* The MAC header is padded to have 32-bit boundary if the 1776 /* The MAC header is padded to have 32-bit boundary if the
@@ -1825,6 +1843,9 @@ accept:
1825 ath5k_check_ibss_tsf(sc, skb, &rxs); 1843 ath5k_check_ibss_tsf(sc, skb, &rxs);
1826 1844
1827 __ieee80211_rx(sc->hw, skb, &rxs); 1845 __ieee80211_rx(sc->hw, skb, &rxs);
1846
1847 bf->skb = next_skb;
1848 bf->skbaddr = next_skb_addr;
1828next: 1849next:
1829 list_move_tail(&bf->list, &sc->rxbuf); 1850 list_move_tail(&bf->list, &sc->rxbuf);
1830 } while (ath5k_rxbuf_setup(sc, bf) == 0); 1851 } while (ath5k_rxbuf_setup(sc, bf) == 0);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index c01ea48da5fe..36bafeb353ce 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -4042,7 +4042,19 @@ static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state)
4042 priv->is_open = 1; 4042 priv->is_open = 1;
4043 } 4043 }
4044 4044
4045 pci_save_state(pdev); 4045 /* pci driver assumes state will be saved in this function.
4046 * pci state is saved and device disabled when interface is
4047 * stopped, so at this time pci device will always be disabled -
4048 * whether interface was started or not. saving pci state now will
4049 * cause saved state be that of a disabled device, which will cause
4050 * problems during resume in that we will end up with a disabled device.
4051 *
4052 * indicate that the current saved state (from when interface was
4053 * stopped) is valid. if interface was never up at time of suspend
4054 * then the saved state will still be valid as it was saved during
4055 * .probe. */
4056 pdev->state_saved = true;
4057
4046 pci_set_power_state(pdev, PCI_D3hot); 4058 pci_set_power_state(pdev, PCI_D3hot);
4047 4059
4048 return 0; 4060 return 0;
@@ -4053,7 +4065,6 @@ static int iwl_pci_resume(struct pci_dev *pdev)
4053 struct iwl_priv *priv = pci_get_drvdata(pdev); 4065 struct iwl_priv *priv = pci_get_drvdata(pdev);
4054 4066
4055 pci_set_power_state(pdev, PCI_D0); 4067 pci_set_power_state(pdev, PCI_D0);
4056 pci_restore_state(pdev);
4057 4068
4058 if (priv->is_open) 4069 if (priv->is_open)
4059 iwl_mac_start(priv->hw); 4070 iwl_mac_start(priv->hw);
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 5b44d322b99f..93be74a1f139 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -8143,7 +8143,19 @@ static int iwl3945_pci_suspend(struct pci_dev *pdev, pm_message_t state)
8143 priv->is_open = 1; 8143 priv->is_open = 1;
8144 } 8144 }
8145 8145
8146 pci_save_state(pdev); 8146 /* pci driver assumes state will be saved in this function.
8147 * pci state is saved and device disabled when interface is
8148 * stopped, so at this time pci device will always be disabled -
8149 * whether interface was started or not. saving pci state now will
8150 * cause saved state be that of a disabled device, which will cause
8151 * problems during resume in that we will end up with a disabled device.
8152 *
8153 * indicate that the current saved state (from when interface was
8154 * stopped) is valid. if interface was never up at time of suspend
8155 * then the saved state will still be valid as it was saved during
8156 * .probe. */
8157 pdev->state_saved = true;
8158
8147 pci_set_power_state(pdev, PCI_D3hot); 8159 pci_set_power_state(pdev, PCI_D3hot);
8148 8160
8149 return 0; 8161 return 0;
@@ -8154,7 +8166,6 @@ static int iwl3945_pci_resume(struct pci_dev *pdev)
8154 struct iwl3945_priv *priv = pci_get_drvdata(pdev); 8166 struct iwl3945_priv *priv = pci_get_drvdata(pdev);
8155 8167
8156 pci_set_power_state(pdev, PCI_D0); 8168 pci_set_power_state(pdev, PCI_D0);
8157 pci_restore_state(pdev);
8158 8169
8159 if (priv->is_open) 8170 if (priv->is_open)
8160 iwl3945_mac_start(priv->hw); 8171 iwl3945_mac_start(priv->hw);
diff --git a/drivers/net/wireless/zd1211rw/zd_rf.c b/drivers/net/wireless/zd1211rw/zd_rf.c
index 7207bfd2e6cd..c875ee05e22e 100644
--- a/drivers/net/wireless/zd1211rw/zd_rf.c
+++ b/drivers/net/wireless/zd1211rw/zd_rf.c
@@ -86,6 +86,7 @@ int zd_rf_init_hw(struct zd_rf *rf, u8 type)
86 case AL7230B_RF: 86 case AL7230B_RF:
87 r = zd_rf_init_al7230b(rf); 87 r = zd_rf_init_al7230b(rf);
88 break; 88 break;
89 case MAXIM_NEW_RF:
89 case UW2453_RF: 90 case UW2453_RF:
90 r = zd_rf_init_uw2453(rf); 91 r = zd_rf_init_uw2453(rf);
91 break; 92 break;
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index 17527f765b39..f0e5e943f6e3 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -37,6 +37,7 @@
37static struct usb_device_id usb_ids[] = { 37static struct usb_device_id usb_ids[] = {
38 /* ZD1211 */ 38 /* ZD1211 */
39 { USB_DEVICE(0x0ace, 0x1211), .driver_info = DEVICE_ZD1211 }, 39 { USB_DEVICE(0x0ace, 0x1211), .driver_info = DEVICE_ZD1211 },
40 { USB_DEVICE(0x0ace, 0xa211), .driver_info = DEVICE_ZD1211 },
40 { USB_DEVICE(0x07b8, 0x6001), .driver_info = DEVICE_ZD1211 }, 41 { USB_DEVICE(0x07b8, 0x6001), .driver_info = DEVICE_ZD1211 },
41 { USB_DEVICE(0x126f, 0xa006), .driver_info = DEVICE_ZD1211 }, 42 { USB_DEVICE(0x126f, 0xa006), .driver_info = DEVICE_ZD1211 },
42 { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 }, 43 { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 },