aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_phy.c4
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rx.c21
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h1
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
261struct iwl_rx_cmd_buffer { 261struct iwl_rx_cmd_buffer {
262 struct page *_page; 262 struct page *_page;
263 unsigned int truesize;
263}; 264};
264 265
265static inline void *rxb_addr(struct iwl_rx_cmd_buffer *r) 266static inline void *rxb_addr(struct iwl_rx_cmd_buffer *r)