aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2012-12-27 11:37:31 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-01-02 14:38:34 -0500
commitf6aa93ad039910ea23d65add0a19ce0c896ea9b3 (patch)
tree33a44889d5c4f0700e9c2c6ebcb6a1051888f63e /drivers/net
parent708b70ff31e0577bff3c48eefa19122f6e346252 (diff)
rtlwifi: rtl8192se: Fix warning for unchecked pci_map_single() call
Kernel 3.8 implements checking of all DMA mapping calls and issues a WARNING for the first it finds that is not checked. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192se/trx.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
index 0e9f6ebf078a..206561d7282f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
@@ -611,6 +611,11 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
611 PCI_DMA_TODEVICE); 611 PCI_DMA_TODEVICE);
612 u8 bw_40 = 0; 612 u8 bw_40 = 0;
613 613
614 if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
615 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
616 "DMA mapping error");
617 return;
618 }
614 if (mac->opmode == NL80211_IFTYPE_STATION) { 619 if (mac->opmode == NL80211_IFTYPE_STATION) {
615 bw_40 = mac->bw_40; 620 bw_40 = mac->bw_40;
616 } else if (mac->opmode == NL80211_IFTYPE_AP || 621 } else if (mac->opmode == NL80211_IFTYPE_AP ||
@@ -763,6 +768,7 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
763void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, 768void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
764 bool firstseg, bool lastseg, struct sk_buff *skb) 769 bool firstseg, bool lastseg, struct sk_buff *skb)
765{ 770{
771 struct rtl_priv *rtlpriv = rtl_priv(hw);
766 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); 772 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
767 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); 773 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
768 struct rtl_tcb_desc *tcb_desc = (struct rtl_tcb_desc *)(skb->cb); 774 struct rtl_tcb_desc *tcb_desc = (struct rtl_tcb_desc *)(skb->cb);
@@ -770,7 +776,12 @@ void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
770 dma_addr_t mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len, 776 dma_addr_t mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len,
771 PCI_DMA_TODEVICE); 777 PCI_DMA_TODEVICE);
772 778
773 /* Clear all status */ 779 if (pci_dma_mapping_error(rtlpci->pdev, mapping)) {
780 RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE,
781 "DMA mapping error");
782 return;
783 }
784 /* Clear all status */
774 CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_CMDDESC_SIZE_RTL8192S); 785 CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_CMDDESC_SIZE_RTL8192S);
775 786
776 /* This bit indicate this packet is used for FW download. */ 787 /* This bit indicate this packet is used for FW download. */