diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-24 04:09:04 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-24 04:09:04 -0400 |
commit | 2759c8d536efe3b853867f345627d89fb64c37af (patch) | |
tree | e8dc66c8c5e2e5dbea9629f1405cdf9bada79985 /drivers/net/wireless/airo.c | |
parent | e2e965072564e7aad8df963107677a6d22c41767 (diff) |
[wireless airo] remove needed dma_addr_t obfuscation
Fixes bus address truncation bug for certain configs.
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r-- | drivers/net/wireless/airo.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index a6194955df2c..746456c34df8 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -2521,7 +2521,8 @@ static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci, | |||
2521 | unsigned long mem_start, mem_len, aux_start, aux_len; | 2521 | unsigned long mem_start, mem_len, aux_start, aux_len; |
2522 | int rc = -1; | 2522 | int rc = -1; |
2523 | int i; | 2523 | int i; |
2524 | unsigned char *busaddroff,*vpackoff; | 2524 | dma_addr_t busaddroff; |
2525 | unsigned char *vpackoff; | ||
2525 | unsigned char __iomem *pciaddroff; | 2526 | unsigned char __iomem *pciaddroff; |
2526 | 2527 | ||
2527 | mem_start = pci_resource_start(pci, 1); | 2528 | mem_start = pci_resource_start(pci, 1); |
@@ -2564,7 +2565,7 @@ static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci, | |||
2564 | /* | 2565 | /* |
2565 | * Setup descriptor RX, TX, CONFIG | 2566 | * Setup descriptor RX, TX, CONFIG |
2566 | */ | 2567 | */ |
2567 | busaddroff = (unsigned char *)ai->shared_dma; | 2568 | busaddroff = ai->shared_dma; |
2568 | pciaddroff = ai->pciaux + AUX_OFFSET; | 2569 | pciaddroff = ai->pciaux + AUX_OFFSET; |
2569 | vpackoff = ai->shared; | 2570 | vpackoff = ai->shared; |
2570 | 2571 | ||
@@ -2573,7 +2574,7 @@ static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci, | |||
2573 | ai->rxfids[i].pending = 0; | 2574 | ai->rxfids[i].pending = 0; |
2574 | ai->rxfids[i].card_ram_off = pciaddroff; | 2575 | ai->rxfids[i].card_ram_off = pciaddroff; |
2575 | ai->rxfids[i].virtual_host_addr = vpackoff; | 2576 | ai->rxfids[i].virtual_host_addr = vpackoff; |
2576 | ai->rxfids[i].rx_desc.host_addr = (dma_addr_t) busaddroff; | 2577 | ai->rxfids[i].rx_desc.host_addr = busaddroff; |
2577 | ai->rxfids[i].rx_desc.valid = 1; | 2578 | ai->rxfids[i].rx_desc.valid = 1; |
2578 | ai->rxfids[i].rx_desc.len = PKTSIZE; | 2579 | ai->rxfids[i].rx_desc.len = PKTSIZE; |
2579 | ai->rxfids[i].rx_desc.rdy = 0; | 2580 | ai->rxfids[i].rx_desc.rdy = 0; |
@@ -2588,7 +2589,7 @@ static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci, | |||
2588 | ai->txfids[i].card_ram_off = pciaddroff; | 2589 | ai->txfids[i].card_ram_off = pciaddroff; |
2589 | ai->txfids[i].virtual_host_addr = vpackoff; | 2590 | ai->txfids[i].virtual_host_addr = vpackoff; |
2590 | ai->txfids[i].tx_desc.valid = 1; | 2591 | ai->txfids[i].tx_desc.valid = 1; |
2591 | ai->txfids[i].tx_desc.host_addr = (dma_addr_t) busaddroff; | 2592 | ai->txfids[i].tx_desc.host_addr = busaddroff; |
2592 | memcpy(ai->txfids[i].virtual_host_addr, | 2593 | memcpy(ai->txfids[i].virtual_host_addr, |
2593 | &wifictlhdr8023, sizeof(wifictlhdr8023)); | 2594 | &wifictlhdr8023, sizeof(wifictlhdr8023)); |
2594 | 2595 | ||
@@ -2601,8 +2602,8 @@ static int mpi_map_card(struct airo_info *ai, struct pci_dev *pci, | |||
2601 | /* Rid descriptor setup */ | 2602 | /* Rid descriptor setup */ |
2602 | ai->config_desc.card_ram_off = pciaddroff; | 2603 | ai->config_desc.card_ram_off = pciaddroff; |
2603 | ai->config_desc.virtual_host_addr = vpackoff; | 2604 | ai->config_desc.virtual_host_addr = vpackoff; |
2604 | ai->config_desc.rid_desc.host_addr = (dma_addr_t) busaddroff; | 2605 | ai->config_desc.rid_desc.host_addr = busaddroff; |
2605 | ai->ridbus = (dma_addr_t)busaddroff; | 2606 | ai->ridbus = busaddroff; |
2606 | ai->config_desc.rid_desc.rid = 0; | 2607 | ai->config_desc.rid_desc.rid = 0; |
2607 | ai->config_desc.rid_desc.len = RIDSIZE; | 2608 | ai->config_desc.rid_desc.len = RIDSIZE; |
2608 | ai->config_desc.rid_desc.valid = 1; | 2609 | ai->config_desc.rid_desc.valid = 1; |