aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2008-12-18 21:37:24 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:08 -0500
commit6100b58806e6307f959af79334ac553825400242 (patch)
treebed0cda1758c177dc698f148cd74fbda852c31c7 /drivers
parentd2bf55839ad77486a02ec32f8411f432621da110 (diff)
iwl3945: use iwl_rx_mem_buffer
The patch replaces iwl3945_rx_mem_buffer with iwl_rx_mem_buffer. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.h16
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c52
3 files changed, 35 insertions, 41 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 93e5c52d91dc..f283b1dea9d7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -330,7 +330,7 @@ static void iwl3945_tx_queue_reclaim(struct iwl3945_priv *priv,
330 * iwl3945_rx_reply_tx - Handle Tx response 330 * iwl3945_rx_reply_tx - Handle Tx response
331 */ 331 */
332static void iwl3945_rx_reply_tx(struct iwl3945_priv *priv, 332static void iwl3945_rx_reply_tx(struct iwl3945_priv *priv,
333 struct iwl3945_rx_mem_buffer *rxb) 333 struct iwl_rx_mem_buffer *rxb)
334{ 334{
335 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 335 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
336 u16 sequence = le16_to_cpu(pkt->hdr.sequence); 336 u16 sequence = le16_to_cpu(pkt->hdr.sequence);
@@ -389,7 +389,7 @@ static void iwl3945_rx_reply_tx(struct iwl3945_priv *priv,
389 * 389 *
390 *****************************************************************************/ 390 *****************************************************************************/
391 391
392void iwl3945_hw_rx_statistics(struct iwl3945_priv *priv, struct iwl3945_rx_mem_buffer *rxb) 392void iwl3945_hw_rx_statistics(struct iwl3945_priv *priv, struct iwl_rx_mem_buffer *rxb)
393{ 393{
394 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 394 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
395 IWL_DEBUG_RX("Statistics notification received (%d vs %d).\n", 395 IWL_DEBUG_RX("Statistics notification received (%d vs %d).\n",
@@ -571,7 +571,7 @@ static int iwl3945_is_network_packet(struct iwl3945_priv *priv,
571} 571}
572 572
573static void iwl3945_pass_packet_to_mac80211(struct iwl3945_priv *priv, 573static void iwl3945_pass_packet_to_mac80211(struct iwl3945_priv *priv,
574 struct iwl3945_rx_mem_buffer *rxb, 574 struct iwl_rx_mem_buffer *rxb,
575 struct ieee80211_rx_status *stats) 575 struct ieee80211_rx_status *stats)
576{ 576{
577 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; 577 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
@@ -614,7 +614,7 @@ static void iwl3945_pass_packet_to_mac80211(struct iwl3945_priv *priv,
614#define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) 614#define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6)
615 615
616static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, 616static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv,
617 struct iwl3945_rx_mem_buffer *rxb) 617 struct iwl_rx_mem_buffer *rxb)
618{ 618{
619 struct ieee80211_hdr *header; 619 struct ieee80211_hdr *header;
620 struct ieee80211_rx_status rx_status; 620 struct ieee80211_rx_status rx_status;
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index e794cd56f612..410a8bd0d4fb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -106,12 +106,6 @@ enum iwl3945_antenna {
106#define DEFAULT_SHORT_RETRY_LIMIT 7U 106#define DEFAULT_SHORT_RETRY_LIMIT 7U
107#define DEFAULT_LONG_RETRY_LIMIT 4U 107#define DEFAULT_LONG_RETRY_LIMIT 4U
108 108
109struct iwl3945_rx_mem_buffer {
110 dma_addr_t dma_addr;
111 struct sk_buff *skb;
112 struct list_head list;
113};
114
115int iwl3945_x2_queue_used(const struct iwl_queue *q, int i); 109int iwl3945_x2_queue_used(const struct iwl_queue *q, int i);
116 110
117#define MAX_NUM_OF_TBS (20) 111#define MAX_NUM_OF_TBS (20)
@@ -229,13 +223,13 @@ struct iwl3945_host_cmd {
229 * @rx_used: List of Rx buffers with no SKB 223 * @rx_used: List of Rx buffers with no SKB
230 * @need_update: flag to indicate we need to update read/write index 224 * @need_update: flag to indicate we need to update read/write index
231 * 225 *
232 * NOTE: rx_free and rx_used are used as a FIFO for iwl3945_rx_mem_buffers 226 * NOTE: rx_free and rx_used are used as a FIFO for iwl_rx_mem_buffers
233 */ 227 */
234struct iwl3945_rx_queue { 228struct iwl3945_rx_queue {
235 __le32 *bd; 229 __le32 *bd;
236 dma_addr_t dma_addr; 230 dma_addr_t dma_addr;
237 struct iwl3945_rx_mem_buffer pool[RX_QUEUE_SIZE + RX_FREE_BUFFERS]; 231 struct iwl_rx_mem_buffer pool[RX_QUEUE_SIZE + RX_FREE_BUFFERS];
238 struct iwl3945_rx_mem_buffer *queue[RX_QUEUE_SIZE]; 232 struct iwl_rx_mem_buffer *queue[RX_QUEUE_SIZE];
239 u32 processed; 233 u32 processed;
240 u32 read; 234 u32 read;
241 u32 write; 235 u32 write;
@@ -409,7 +403,7 @@ extern void iwl3945_hw_build_tx_cmd_rate(struct iwl3945_priv *priv,
409extern int iwl3945_hw_reg_send_txpower(struct iwl3945_priv *priv); 403extern int iwl3945_hw_reg_send_txpower(struct iwl3945_priv *priv);
410extern int iwl3945_hw_reg_set_txpower(struct iwl3945_priv *priv, s8 power); 404extern int iwl3945_hw_reg_set_txpower(struct iwl3945_priv *priv, s8 power);
411extern void iwl3945_hw_rx_statistics(struct iwl3945_priv *priv, 405extern void iwl3945_hw_rx_statistics(struct iwl3945_priv *priv,
412 struct iwl3945_rx_mem_buffer *rxb); 406 struct iwl_rx_mem_buffer *rxb);
413extern void iwl3945_disable_events(struct iwl3945_priv *priv); 407extern void iwl3945_disable_events(struct iwl3945_priv *priv);
414extern int iwl4965_get_temperature(const struct iwl3945_priv *priv); 408extern int iwl4965_get_temperature(const struct iwl3945_priv *priv);
415 409
@@ -464,7 +458,7 @@ struct iwl3945_priv {
464 int alloc_rxb_skb; 458 int alloc_rxb_skb;
465 459
466 void (*rx_handlers[REPLY_MAX])(struct iwl3945_priv *priv, 460 void (*rx_handlers[REPLY_MAX])(struct iwl3945_priv *priv,
467 struct iwl3945_rx_mem_buffer *rxb); 461 struct iwl_rx_mem_buffer *rxb);
468 462
469 struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; 463 struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
470 464
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 6fb5d07ec6b9..47db9087e68b 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2863,7 +2863,7 @@ static int iwl3945_get_measurement(struct iwl3945_priv *priv,
2863#endif 2863#endif
2864 2864
2865static void iwl3945_rx_reply_alive(struct iwl3945_priv *priv, 2865static void iwl3945_rx_reply_alive(struct iwl3945_priv *priv,
2866 struct iwl3945_rx_mem_buffer *rxb) 2866 struct iwl_rx_mem_buffer *rxb)
2867{ 2867{
2868 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 2868 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
2869 struct iwl_alive_resp *palive; 2869 struct iwl_alive_resp *palive;
@@ -2899,7 +2899,7 @@ static void iwl3945_rx_reply_alive(struct iwl3945_priv *priv,
2899} 2899}
2900 2900
2901static void iwl3945_rx_reply_add_sta(struct iwl3945_priv *priv, 2901static void iwl3945_rx_reply_add_sta(struct iwl3945_priv *priv,
2902 struct iwl3945_rx_mem_buffer *rxb) 2902 struct iwl_rx_mem_buffer *rxb)
2903{ 2903{
2904 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 2904 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
2905 2905
@@ -2908,7 +2908,7 @@ static void iwl3945_rx_reply_add_sta(struct iwl3945_priv *priv,
2908} 2908}
2909 2909
2910static void iwl3945_rx_reply_error(struct iwl3945_priv *priv, 2910static void iwl3945_rx_reply_error(struct iwl3945_priv *priv,
2911 struct iwl3945_rx_mem_buffer *rxb) 2911 struct iwl_rx_mem_buffer *rxb)
2912{ 2912{
2913 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 2913 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
2914 2914
@@ -2923,7 +2923,7 @@ static void iwl3945_rx_reply_error(struct iwl3945_priv *priv,
2923 2923
2924#define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x 2924#define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x
2925 2925
2926static void iwl3945_rx_csa(struct iwl3945_priv *priv, struct iwl3945_rx_mem_buffer *rxb) 2926static void iwl3945_rx_csa(struct iwl3945_priv *priv, struct iwl_rx_mem_buffer *rxb)
2927{ 2927{
2928 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 2928 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
2929 struct iwl3945_rxon_cmd *rxon = (void *)&priv->active_rxon; 2929 struct iwl3945_rxon_cmd *rxon = (void *)&priv->active_rxon;
@@ -2935,7 +2935,7 @@ static void iwl3945_rx_csa(struct iwl3945_priv *priv, struct iwl3945_rx_mem_buff
2935} 2935}
2936 2936
2937static void iwl3945_rx_spectrum_measure_notif(struct iwl3945_priv *priv, 2937static void iwl3945_rx_spectrum_measure_notif(struct iwl3945_priv *priv,
2938 struct iwl3945_rx_mem_buffer *rxb) 2938 struct iwl_rx_mem_buffer *rxb)
2939{ 2939{
2940#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT 2940#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT
2941 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 2941 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
@@ -2953,7 +2953,7 @@ static void iwl3945_rx_spectrum_measure_notif(struct iwl3945_priv *priv,
2953} 2953}
2954 2954
2955static void iwl3945_rx_pm_sleep_notif(struct iwl3945_priv *priv, 2955static void iwl3945_rx_pm_sleep_notif(struct iwl3945_priv *priv,
2956 struct iwl3945_rx_mem_buffer *rxb) 2956 struct iwl_rx_mem_buffer *rxb)
2957{ 2957{
2958#ifdef CONFIG_IWL3945_DEBUG 2958#ifdef CONFIG_IWL3945_DEBUG
2959 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 2959 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
@@ -2964,7 +2964,7 @@ static void iwl3945_rx_pm_sleep_notif(struct iwl3945_priv *priv,
2964} 2964}
2965 2965
2966static void iwl3945_rx_pm_debug_statistics_notif(struct iwl3945_priv *priv, 2966static void iwl3945_rx_pm_debug_statistics_notif(struct iwl3945_priv *priv,
2967 struct iwl3945_rx_mem_buffer *rxb) 2967 struct iwl_rx_mem_buffer *rxb)
2968{ 2968{
2969 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 2969 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
2970 IWL_DEBUG_RADIO("Dumping %d bytes of unhandled " 2970 IWL_DEBUG_RADIO("Dumping %d bytes of unhandled "
@@ -3000,7 +3000,7 @@ static void iwl3945_bg_beacon_update(struct work_struct *work)
3000} 3000}
3001 3001
3002static void iwl3945_rx_beacon_notif(struct iwl3945_priv *priv, 3002static void iwl3945_rx_beacon_notif(struct iwl3945_priv *priv,
3003 struct iwl3945_rx_mem_buffer *rxb) 3003 struct iwl_rx_mem_buffer *rxb)
3004{ 3004{
3005#ifdef CONFIG_IWL3945_DEBUG 3005#ifdef CONFIG_IWL3945_DEBUG
3006 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3006 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3023,7 +3023,7 @@ static void iwl3945_rx_beacon_notif(struct iwl3945_priv *priv,
3023 3023
3024/* Service response to REPLY_SCAN_CMD (0x80) */ 3024/* Service response to REPLY_SCAN_CMD (0x80) */
3025static void iwl3945_rx_reply_scan(struct iwl3945_priv *priv, 3025static void iwl3945_rx_reply_scan(struct iwl3945_priv *priv,
3026 struct iwl3945_rx_mem_buffer *rxb) 3026 struct iwl_rx_mem_buffer *rxb)
3027{ 3027{
3028#ifdef CONFIG_IWL3945_DEBUG 3028#ifdef CONFIG_IWL3945_DEBUG
3029 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3029 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
@@ -3036,7 +3036,7 @@ static void iwl3945_rx_reply_scan(struct iwl3945_priv *priv,
3036 3036
3037/* Service SCAN_START_NOTIFICATION (0x82) */ 3037/* Service SCAN_START_NOTIFICATION (0x82) */
3038static void iwl3945_rx_scan_start_notif(struct iwl3945_priv *priv, 3038static void iwl3945_rx_scan_start_notif(struct iwl3945_priv *priv,
3039 struct iwl3945_rx_mem_buffer *rxb) 3039 struct iwl_rx_mem_buffer *rxb)
3040{ 3040{
3041 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3041 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3042 struct iwl_scanstart_notification *notif = 3042 struct iwl_scanstart_notification *notif =
@@ -3053,7 +3053,7 @@ static void iwl3945_rx_scan_start_notif(struct iwl3945_priv *priv,
3053 3053
3054/* Service SCAN_RESULTS_NOTIFICATION (0x83) */ 3054/* Service SCAN_RESULTS_NOTIFICATION (0x83) */
3055static void iwl3945_rx_scan_results_notif(struct iwl3945_priv *priv, 3055static void iwl3945_rx_scan_results_notif(struct iwl3945_priv *priv,
3056 struct iwl3945_rx_mem_buffer *rxb) 3056 struct iwl_rx_mem_buffer *rxb)
3057{ 3057{
3058 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3058 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3059 struct iwl_scanresults_notification *notif = 3059 struct iwl_scanresults_notification *notif =
@@ -3078,7 +3078,7 @@ static void iwl3945_rx_scan_results_notif(struct iwl3945_priv *priv,
3078 3078
3079/* Service SCAN_COMPLETE_NOTIFICATION (0x84) */ 3079/* Service SCAN_COMPLETE_NOTIFICATION (0x84) */
3080static void iwl3945_rx_scan_complete_notif(struct iwl3945_priv *priv, 3080static void iwl3945_rx_scan_complete_notif(struct iwl3945_priv *priv,
3081 struct iwl3945_rx_mem_buffer *rxb) 3081 struct iwl_rx_mem_buffer *rxb)
3082{ 3082{
3083 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3083 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3084 struct iwl_scancomplete_notification *scan_notif = (void *)pkt->u.raw; 3084 struct iwl_scancomplete_notification *scan_notif = (void *)pkt->u.raw;
@@ -3141,7 +3141,7 @@ reschedule:
3141/* Handle notification from uCode that card's power state is changing 3141/* Handle notification from uCode that card's power state is changing
3142 * due to software, hardware, or critical temperature RFKILL */ 3142 * due to software, hardware, or critical temperature RFKILL */
3143static void iwl3945_rx_card_state_notif(struct iwl3945_priv *priv, 3143static void iwl3945_rx_card_state_notif(struct iwl3945_priv *priv,
3144 struct iwl3945_rx_mem_buffer *rxb) 3144 struct iwl_rx_mem_buffer *rxb)
3145{ 3145{
3146 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3146 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3147 u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags); 3147 u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags);
@@ -3259,7 +3259,7 @@ static void iwl3945_cmd_queue_reclaim(struct iwl3945_priv *priv,
3259 * if the callback returns 1 3259 * if the callback returns 1
3260 */ 3260 */
3261static void iwl3945_tx_cmd_complete(struct iwl3945_priv *priv, 3261static void iwl3945_tx_cmd_complete(struct iwl3945_priv *priv,
3262 struct iwl3945_rx_mem_buffer *rxb) 3262 struct iwl_rx_mem_buffer *rxb)
3263{ 3263{
3264 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; 3264 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
3265 u16 sequence = le16_to_cpu(pkt->hdr.sequence); 3265 u16 sequence = le16_to_cpu(pkt->hdr.sequence);
@@ -3346,7 +3346,7 @@ static void iwl3945_tx_cmd_complete(struct iwl3945_priv *priv,
3346 * are available, schedules iwl3945_rx_replenish 3346 * are available, schedules iwl3945_rx_replenish
3347 * 3347 *
3348 * -- enable interrupts -- 3348 * -- enable interrupts --
3349 * ISR - iwl3945_rx() Detach iwl3945_rx_mem_buffers from pool up to the 3349 * ISR - iwl3945_rx() Detach iwl_rx_mem_buffers from pool up to the
3350 * READ INDEX, detaching the SKB from the pool. 3350 * READ INDEX, detaching the SKB from the pool.
3351 * Moves the packet buffer from queue to rx_used. 3351 * Moves the packet buffer from queue to rx_used.
3352 * Calls iwl3945_rx_queue_restock to refill any empty 3352 * Calls iwl3945_rx_queue_restock to refill any empty
@@ -3440,7 +3440,7 @@ static int iwl3945_rx_queue_restock(struct iwl3945_priv *priv)
3440{ 3440{
3441 struct iwl3945_rx_queue *rxq = &priv->rxq; 3441 struct iwl3945_rx_queue *rxq = &priv->rxq;
3442 struct list_head *element; 3442 struct list_head *element;
3443 struct iwl3945_rx_mem_buffer *rxb; 3443 struct iwl_rx_mem_buffer *rxb;
3444 unsigned long flags; 3444 unsigned long flags;
3445 int write, rc; 3445 int write, rc;
3446 3446
@@ -3449,11 +3449,11 @@ static int iwl3945_rx_queue_restock(struct iwl3945_priv *priv)
3449 while ((iwl3945_rx_queue_space(rxq) > 0) && (rxq->free_count)) { 3449 while ((iwl3945_rx_queue_space(rxq) > 0) && (rxq->free_count)) {
3450 /* Get next free Rx buffer, remove from free list */ 3450 /* Get next free Rx buffer, remove from free list */
3451 element = rxq->rx_free.next; 3451 element = rxq->rx_free.next;
3452 rxb = list_entry(element, struct iwl3945_rx_mem_buffer, list); 3452 rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
3453 list_del(element); 3453 list_del(element);
3454 3454
3455 /* Point to Rx buffer via next RBD in circular buffer */ 3455 /* Point to Rx buffer via next RBD in circular buffer */
3456 rxq->bd[rxq->write] = iwl3945_dma_addr2rbd_ptr(priv, rxb->dma_addr); 3456 rxq->bd[rxq->write] = iwl3945_dma_addr2rbd_ptr(priv, rxb->real_dma_addr);
3457 rxq->queue[rxq->write] = rxb; 3457 rxq->queue[rxq->write] = rxb;
3458 rxq->write = (rxq->write + 1) & RX_QUEUE_MASK; 3458 rxq->write = (rxq->write + 1) & RX_QUEUE_MASK;
3459 rxq->free_count--; 3459 rxq->free_count--;
@@ -3492,12 +3492,12 @@ static void iwl3945_rx_allocate(struct iwl3945_priv *priv)
3492{ 3492{
3493 struct iwl3945_rx_queue *rxq = &priv->rxq; 3493 struct iwl3945_rx_queue *rxq = &priv->rxq;
3494 struct list_head *element; 3494 struct list_head *element;
3495 struct iwl3945_rx_mem_buffer *rxb; 3495 struct iwl_rx_mem_buffer *rxb;
3496 unsigned long flags; 3496 unsigned long flags;
3497 spin_lock_irqsave(&rxq->lock, flags); 3497 spin_lock_irqsave(&rxq->lock, flags);
3498 while (!list_empty(&rxq->rx_used)) { 3498 while (!list_empty(&rxq->rx_used)) {
3499 element = rxq->rx_used.next; 3499 element = rxq->rx_used.next;
3500 rxb = list_entry(element, struct iwl3945_rx_mem_buffer, list); 3500 rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
3501 3501
3502 /* Alloc a new receive buffer */ 3502 /* Alloc a new receive buffer */
3503 rxb->skb = 3503 rxb->skb =
@@ -3524,7 +3524,7 @@ static void iwl3945_rx_allocate(struct iwl3945_priv *priv)
3524 list_del(element); 3524 list_del(element);
3525 3525
3526 /* Get physical address of RB/SKB */ 3526 /* Get physical address of RB/SKB */
3527 rxb->dma_addr = 3527 rxb->real_dma_addr =
3528 pci_map_single(priv->pci_dev, rxb->skb->data, 3528 pci_map_single(priv->pci_dev, rxb->skb->data,
3529 IWL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE); 3529 IWL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
3530 list_add_tail(&rxb->list, &rxq->rx_free); 3530 list_add_tail(&rxb->list, &rxq->rx_free);
@@ -3568,7 +3568,7 @@ static void iwl3945_rx_queue_free(struct iwl3945_priv *priv, struct iwl3945_rx_q
3568 for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) { 3568 for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) {
3569 if (rxq->pool[i].skb != NULL) { 3569 if (rxq->pool[i].skb != NULL) {
3570 pci_unmap_single(priv->pci_dev, 3570 pci_unmap_single(priv->pci_dev,
3571 rxq->pool[i].dma_addr, 3571 rxq->pool[i].real_dma_addr,
3572 IWL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE); 3572 IWL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
3573 dev_kfree_skb(rxq->pool[i].skb); 3573 dev_kfree_skb(rxq->pool[i].skb);
3574 } 3574 }
@@ -3619,7 +3619,7 @@ void iwl3945_rx_queue_reset(struct iwl3945_priv *priv, struct iwl3945_rx_queue *
3619 * to an SKB, so we need to unmap and free potential storage */ 3619 * to an SKB, so we need to unmap and free potential storage */
3620 if (rxq->pool[i].skb != NULL) { 3620 if (rxq->pool[i].skb != NULL) {
3621 pci_unmap_single(priv->pci_dev, 3621 pci_unmap_single(priv->pci_dev,
3622 rxq->pool[i].dma_addr, 3622 rxq->pool[i].real_dma_addr,
3623 IWL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE); 3623 IWL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
3624 priv->alloc_rxb_skb--; 3624 priv->alloc_rxb_skb--;
3625 dev_kfree_skb(rxq->pool[i].skb); 3625 dev_kfree_skb(rxq->pool[i].skb);
@@ -3722,7 +3722,7 @@ int iwl3945_calc_sig_qual(int rssi_dbm, int noise_dbm)
3722 */ 3722 */
3723static void iwl3945_rx_handle(struct iwl3945_priv *priv) 3723static void iwl3945_rx_handle(struct iwl3945_priv *priv)
3724{ 3724{
3725 struct iwl3945_rx_mem_buffer *rxb; 3725 struct iwl_rx_mem_buffer *rxb;
3726 struct iwl_rx_packet *pkt; 3726 struct iwl_rx_packet *pkt;
3727 struct iwl3945_rx_queue *rxq = &priv->rxq; 3727 struct iwl3945_rx_queue *rxq = &priv->rxq;
3728 u32 r, i; 3728 u32 r, i;
@@ -3752,7 +3752,7 @@ static void iwl3945_rx_handle(struct iwl3945_priv *priv)
3752 3752
3753 rxq->queue[i] = NULL; 3753 rxq->queue[i] = NULL;
3754 3754
3755 pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->dma_addr, 3755 pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->real_dma_addr,
3756 IWL_RX_BUF_SIZE, 3756 IWL_RX_BUF_SIZE,
3757 PCI_DMA_FROMDEVICE); 3757 PCI_DMA_FROMDEVICE);
3758 pkt = (struct iwl_rx_packet *)rxb->skb->data; 3758 pkt = (struct iwl_rx_packet *)rxb->skb->data;
@@ -3802,7 +3802,7 @@ static void iwl3945_rx_handle(struct iwl3945_priv *priv)
3802 rxb->skb = NULL; 3802 rxb->skb = NULL;
3803 } 3803 }
3804 3804
3805 pci_unmap_single(priv->pci_dev, rxb->dma_addr, 3805 pci_unmap_single(priv->pci_dev, rxb->real_dma_addr,
3806 IWL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE); 3806 IWL_RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
3807 spin_lock_irqsave(&rxq->lock, flags); 3807 spin_lock_irqsave(&rxq->lock, flags);
3808 list_add_tail(&rxb->list, &priv->rxq.rx_used); 3808 list_add_tail(&rxb->list, &priv->rxq.rx_used);