diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-04 12:07:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-04 12:07:15 -0400 |
commit | 6e1344e8088bd2de059a0fee4e15ddf6909fd833 (patch) | |
tree | 53ba06e9f568fabdec3d6fae02c7a11025f7f6f5 /drivers | |
parent | 8af3994e23b02ef18bde7e5174ef6d902b402677 (diff) | |
parent | 3c3052eac295678fd2765552c6a86d5441306cb4 (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rx.c | 21 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.h | 1 |
5 files changed, 20 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index deb6cfb2959a..600aca9fe6b1 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -373,7 +373,7 @@ static void ar9003_hw_spur_ofdm_work(struct ath_hw *ah, | |||
373 | else | 373 | else |
374 | spur_subchannel_sd = 0; | 374 | spur_subchannel_sd = 0; |
375 | 375 | ||
376 | spur_freq_sd = (freq_offset << 9) / 11; | 376 | spur_freq_sd = ((freq_offset + 10) << 9) / 11; |
377 | 377 | ||
378 | } else { | 378 | } else { |
379 | if (REG_READ_FIELD(ah, AR_PHY_GEN_CTRL, | 379 | if (REG_READ_FIELD(ah, AR_PHY_GEN_CTRL, |
@@ -382,7 +382,7 @@ static void ar9003_hw_spur_ofdm_work(struct ath_hw *ah, | |||
382 | else | 382 | else |
383 | spur_subchannel_sd = 1; | 383 | spur_subchannel_sd = 1; |
384 | 384 | ||
385 | spur_freq_sd = (freq_offset << 9) / 11; | 385 | spur_freq_sd = ((freq_offset - 10) << 9) / 11; |
386 | 386 | ||
387 | } | 387 | } |
388 | 388 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index eb3829b03cd3..e2b34e1563f4 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | |||
@@ -2637,6 +2637,7 @@ static int brcmf_sdbrcm_dpc_thread(void *data) | |||
2637 | /* after stopping the bus, exit thread */ | 2637 | /* after stopping the bus, exit thread */ |
2638 | brcmf_sdbrcm_bus_stop(bus->sdiodev->dev); | 2638 | brcmf_sdbrcm_bus_stop(bus->sdiodev->dev); |
2639 | bus->dpc_tsk = NULL; | 2639 | bus->dpc_tsk = NULL; |
2640 | spin_lock_irqsave(&bus->dpc_tl_lock, flags); | ||
2640 | break; | 2641 | break; |
2641 | } | 2642 | } |
2642 | 2643 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c index f4b84d1596e3..22474608a70b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c | |||
@@ -773,8 +773,7 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
773 | struct sk_buff *skb; | 773 | struct sk_buff *skb; |
774 | __le16 fc = hdr->frame_control; | 774 | __le16 fc = hdr->frame_control; |
775 | struct iwl_rxon_context *ctx; | 775 | struct iwl_rxon_context *ctx; |
776 | struct page *p; | 776 | unsigned int hdrlen, fraglen; |
777 | int offset; | ||
778 | 777 | ||
779 | /* We only process data packets if the interface is open */ | 778 | /* We only process data packets if the interface is open */ |
780 | if (unlikely(!priv->is_open)) { | 779 | if (unlikely(!priv->is_open)) { |
@@ -788,16 +787,24 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
788 | iwlagn_set_decrypted_flag(priv, hdr, ampdu_status, stats)) | 787 | iwlagn_set_decrypted_flag(priv, hdr, ampdu_status, stats)) |
789 | return; | 788 | return; |
790 | 789 | ||
791 | skb = dev_alloc_skb(128); | 790 | /* Dont use dev_alloc_skb(), we'll have enough headroom once |
791 | * ieee80211_hdr pulled. | ||
792 | */ | ||
793 | skb = alloc_skb(128, GFP_ATOMIC); | ||
792 | if (!skb) { | 794 | if (!skb) { |
793 | IWL_ERR(priv, "dev_alloc_skb failed\n"); | 795 | IWL_ERR(priv, "alloc_skb failed\n"); |
794 | return; | 796 | return; |
795 | } | 797 | } |
798 | hdrlen = min_t(unsigned int, len, skb_tailroom(skb)); | ||
799 | memcpy(skb_put(skb, hdrlen), hdr, hdrlen); | ||
800 | fraglen = len - hdrlen; | ||
796 | 801 | ||
797 | offset = (void *)hdr - rxb_addr(rxb); | 802 | if (fraglen) { |
798 | p = rxb_steal_page(rxb); | 803 | int offset = (void *)hdr + hdrlen - rxb_addr(rxb); |
799 | skb_add_rx_frag(skb, 0, p, offset, len, len); | ||
800 | 804 | ||
805 | skb_add_rx_frag(skb, 0, rxb_steal_page(rxb), offset, | ||
806 | fraglen, rxb->truesize); | ||
807 | } | ||
801 | iwl_update_stats(priv, false, fc, len); | 808 | iwl_update_stats(priv, false, fc, len); |
802 | 809 | ||
803 | /* | 810 | /* |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c index 8b1a7988e176..aa7aea168138 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | |||
@@ -374,8 +374,9 @@ static void iwl_rx_handle_rxbuf(struct iwl_trans *trans, | |||
374 | if (WARN_ON(!rxb)) | 374 | if (WARN_ON(!rxb)) |
375 | return; | 375 | return; |
376 | 376 | ||
377 | rxcb.truesize = PAGE_SIZE << hw_params(trans).rx_page_order; | ||
377 | dma_unmap_page(trans->dev, rxb->page_dma, | 378 | dma_unmap_page(trans->dev, rxb->page_dma, |
378 | PAGE_SIZE << hw_params(trans).rx_page_order, | 379 | rxcb.truesize, |
379 | DMA_FROM_DEVICE); | 380 | DMA_FROM_DEVICE); |
380 | 381 | ||
381 | rxcb._page = rxb->page; | 382 | rxcb._page = rxb->page; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index 0c81cbaa8088..fdf97886a5e4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h | |||
@@ -260,6 +260,7 @@ static inline void iwl_free_resp(struct iwl_host_cmd *cmd) | |||
260 | 260 | ||
261 | struct iwl_rx_cmd_buffer { | 261 | struct iwl_rx_cmd_buffer { |
262 | struct page *_page; | 262 | struct page *_page; |
263 | unsigned int truesize; | ||
263 | }; | 264 | }; |
264 | 265 | ||
265 | static inline void *rxb_addr(struct iwl_rx_cmd_buffer *r) | 266 | static inline void *rxb_addr(struct iwl_rx_cmd_buffer *r) |