aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath9k/beacon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath9k/beacon.c')
-rw-r--r--drivers/net/wireless/ath9k/beacon.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c
index 3ab0b43aaf9..f02b099d3e3 100644
--- a/drivers/net/wireless/ath9k/beacon.c
+++ b/drivers/net/wireless/ath9k/beacon.c
@@ -164,7 +164,7 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
bf = avp->av_bcbuf;
skb = (struct sk_buff *)bf->bf_mpdu;
if (skb) {
- pci_unmap_single(sc->pdev, bf->bf_dmacontext,
+ pci_unmap_single(to_pci_dev(sc->dev), bf->bf_dmacontext,
skb->len,
PCI_DMA_TODEVICE);
dev_kfree_skb_any(skb);
@@ -188,10 +188,11 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
}
bf->bf_buf_addr = bf->bf_dmacontext =
- pci_map_single(sc->pdev, skb->data,
+ pci_map_single(to_pci_dev(sc->dev), skb->data,
skb->len,
PCI_DMA_TODEVICE);
- if (unlikely(pci_dma_mapping_error(sc->pdev, bf->bf_buf_addr))) {
+ if (unlikely(pci_dma_mapping_error(to_pci_dev(sc->dev),
+ bf->bf_buf_addr))) {
dev_kfree_skb_any(skb);
bf->bf_mpdu = NULL;
DPRINTF(sc, ATH_DBG_CONFIG,
@@ -343,7 +344,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
bf = avp->av_bcbuf;
if (bf->bf_mpdu != NULL) {
skb = (struct sk_buff *)bf->bf_mpdu;
- pci_unmap_single(sc->pdev, bf->bf_dmacontext,
+ pci_unmap_single(to_pci_dev(sc->dev), bf->bf_dmacontext,
skb->len,
PCI_DMA_TODEVICE);
dev_kfree_skb_any(skb);
@@ -402,10 +403,11 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
bf->bf_mpdu = skb;
bf->bf_buf_addr = bf->bf_dmacontext =
- pci_map_single(sc->pdev, skb->data,
+ pci_map_single(to_pci_dev(sc->dev), skb->data,
skb->len,
PCI_DMA_TODEVICE);
- if (unlikely(pci_dma_mapping_error(sc->pdev, bf->bf_buf_addr))) {
+ if (unlikely(pci_dma_mapping_error(to_pci_dev(sc->dev),
+ bf->bf_buf_addr))) {
dev_kfree_skb_any(skb);
bf->bf_mpdu = NULL;
DPRINTF(sc, ATH_DBG_CONFIG,
@@ -429,7 +431,8 @@ void ath_beacon_return(struct ath_softc *sc, struct ath_vap *avp)
bf = avp->av_bcbuf;
if (bf->bf_mpdu != NULL) {
struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu;
- pci_unmap_single(sc->pdev, bf->bf_dmacontext,
+ pci_unmap_single(to_pci_dev(sc->dev),
+ bf->bf_dmacontext,
skb->len,
PCI_DMA_TODEVICE);
dev_kfree_skb_any(skb);