diff options
author | Mike McCormack <mikem@ring3k.org> | 2011-03-10 08:33:36 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-14 15:24:45 -0400 |
commit | 09145962d6fdcecc229e685bc2321bd29fdc94c9 (patch) | |
tree | 63fb7e6f1a554dc99c8856661c128321cb069077 /drivers/staging/rtl8192e | |
parent | 45a43a84cdabc1918b9e59c829587fe1be7cee92 (diff) |
staging: rtl8192e: Pass ieee80211_device to callbacks
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/ieee80211/ieee80211.h | 14 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c | 38 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r8192E.h | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r8192E_core.c | 41 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r819xE_cmdpkt.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r819xE_firmware.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r819xE_phy.c | 5 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r819xE_phy.h | 2 |
10 files changed, 62 insertions, 60 deletions
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h index 1acaefcd54f..57ff8e55bd6 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h | |||
@@ -2124,7 +2124,7 @@ struct ieee80211_device { | |||
2124 | * This fucntion can't sleep. | 2124 | * This fucntion can't sleep. |
2125 | */ | 2125 | */ |
2126 | int (*softmac_hard_start_xmit)(struct sk_buff *skb, | 2126 | int (*softmac_hard_start_xmit)(struct sk_buff *skb, |
2127 | struct net_device *dev); | 2127 | struct ieee80211_device *ieee80211); |
2128 | 2128 | ||
2129 | /* used instead of hard_start_xmit (not softmac_hard_start_xmit) | 2129 | /* used instead of hard_start_xmit (not softmac_hard_start_xmit) |
2130 | * if the IEEE_SOFTMAC_TX_QUEUE feature is used to TX data | 2130 | * if the IEEE_SOFTMAC_TX_QUEUE feature is used to TX data |
@@ -2133,22 +2133,22 @@ struct ieee80211_device { | |||
2133 | * This function can't sleep. | 2133 | * This function can't sleep. |
2134 | */ | 2134 | */ |
2135 | void (*softmac_data_hard_start_xmit)(struct sk_buff *skb, | 2135 | void (*softmac_data_hard_start_xmit)(struct sk_buff *skb, |
2136 | struct net_device *dev,int rate); | 2136 | struct ieee80211_device *ieee80211, int rate); |
2137 | 2137 | ||
2138 | /* stops the HW queue for DATA frames. Useful to avoid | 2138 | /* stops the HW queue for DATA frames. Useful to avoid |
2139 | * waste time to TX data frame when we are reassociating | 2139 | * waste time to TX data frame when we are reassociating |
2140 | * This function can sleep. | 2140 | * This function can sleep. |
2141 | */ | 2141 | */ |
2142 | void (*data_hard_stop)(struct net_device *dev); | 2142 | void (*data_hard_stop)(struct ieee80211_device *ieee80211); |
2143 | 2143 | ||
2144 | /* OK this is complementar to data_poll_hard_stop */ | 2144 | /* OK this is complementar to data_poll_hard_stop */ |
2145 | void (*data_hard_resume)(struct net_device *dev); | 2145 | void (*data_hard_resume)(struct ieee80211_device *ieee80211); |
2146 | 2146 | ||
2147 | /* ask to the driver to retune the radio . | 2147 | /* ask to the driver to retune the radio . |
2148 | * This function can sleep. the driver should ensure | 2148 | * This function can sleep. the driver should ensure |
2149 | * the radio has been swithced before return. | 2149 | * the radio has been swithced before return. |
2150 | */ | 2150 | */ |
2151 | void (*set_chan)(struct net_device *dev,short ch); | 2151 | void (*set_chan)(struct ieee80211_device *ieee80211, short ch); |
2152 | 2152 | ||
2153 | /* These are not used if the ieee stack takes care of | 2153 | /* These are not used if the ieee stack takes care of |
2154 | * scanning (IEEE_SOFTMAC_SCAN feature set). | 2154 | * scanning (IEEE_SOFTMAC_SCAN feature set). |
@@ -2182,8 +2182,8 @@ struct ieee80211_device { | |||
2182 | * stop_send_bacons is NOT guaranteed to be called only | 2182 | * stop_send_bacons is NOT guaranteed to be called only |
2183 | * after start_send_beacons. | 2183 | * after start_send_beacons. |
2184 | */ | 2184 | */ |
2185 | void (*start_send_beacons) (struct net_device *dev); | 2185 | void (*start_send_beacons) (struct ieee80211_device *dev); |
2186 | void (*stop_send_beacons) (struct net_device *dev); | 2186 | void (*stop_send_beacons) (struct ieee80211_device *dev); |
2187 | 2187 | ||
2188 | /* power save mode related */ | 2188 | /* power save mode related */ |
2189 | void (*sta_wake_up) (struct net_device *dev); | 2189 | void (*sta_wake_up) (struct net_device *dev); |
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c index 8d73a731376..b4fea6f7509 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c | |||
@@ -243,7 +243,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee | |||
243 | ieee->seq_ctrl[0]++; | 243 | ieee->seq_ctrl[0]++; |
244 | 244 | ||
245 | /* avoid watchdog triggers */ | 245 | /* avoid watchdog triggers */ |
246 | ieee->softmac_data_hard_start_xmit(skb,ieee->dev,ieee->basic_rate); | 246 | ieee->softmac_data_hard_start_xmit(skb, ieee, ieee->basic_rate); |
247 | } | 247 | } |
248 | 248 | ||
249 | spin_unlock_irqrestore(&ieee->lock, flags); | 249 | spin_unlock_irqrestore(&ieee->lock, flags); |
@@ -268,7 +268,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee | |||
268 | * */ | 268 | * */ |
269 | skb_queue_tail(&ieee->skb_waitQ[tcb_desc->queue_index], skb); | 269 | skb_queue_tail(&ieee->skb_waitQ[tcb_desc->queue_index], skb); |
270 | } else { | 270 | } else { |
271 | ieee->softmac_hard_start_xmit(skb,ieee->dev); | 271 | ieee->softmac_hard_start_xmit(skb, ieee); |
272 | } | 272 | } |
273 | spin_unlock(&ieee->mgmt_tx_lock); | 273 | spin_unlock(&ieee->mgmt_tx_lock); |
274 | } | 274 | } |
@@ -297,7 +297,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *i | |||
297 | ieee->seq_ctrl[0]++; | 297 | ieee->seq_ctrl[0]++; |
298 | 298 | ||
299 | /* avoid watchdog triggers */ | 299 | /* avoid watchdog triggers */ |
300 | ieee->softmac_data_hard_start_xmit(skb,ieee->dev,ieee->basic_rate); | 300 | ieee->softmac_data_hard_start_xmit(skb, ieee, ieee->basic_rate); |
301 | 301 | ||
302 | }else{ | 302 | }else{ |
303 | 303 | ||
@@ -308,7 +308,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *i | |||
308 | else | 308 | else |
309 | ieee->seq_ctrl[0]++; | 309 | ieee->seq_ctrl[0]++; |
310 | 310 | ||
311 | ieee->softmac_hard_start_xmit(skb,ieee->dev); | 311 | ieee->softmac_hard_start_xmit(skb, ieee); |
312 | 312 | ||
313 | } | 313 | } |
314 | } | 314 | } |
@@ -448,7 +448,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee) | |||
448 | 448 | ||
449 | if (ieee->state == IEEE80211_LINKED) | 449 | if (ieee->state == IEEE80211_LINKED) |
450 | goto out; | 450 | goto out; |
451 | ieee->set_chan(ieee->dev, ch); | 451 | ieee->set_chan(ieee, ch); |
452 | #ifdef ENABLE_DOT11D | 452 | #ifdef ENABLE_DOT11D |
453 | if(channel_map[ch] == 1) | 453 | if(channel_map[ch] == 1) |
454 | #endif | 454 | #endif |
@@ -517,7 +517,7 @@ void ieee80211_softmac_scan_wq(struct work_struct *work) | |||
517 | #endif | 517 | #endif |
518 | if (ieee->scanning == 0 ) | 518 | if (ieee->scanning == 0 ) |
519 | goto out; | 519 | goto out; |
520 | ieee->set_chan(ieee->dev, ieee->current_network.channel); | 520 | ieee->set_chan(ieee, ieee->current_network.channel); |
521 | #ifdef ENABLE_DOT11D | 521 | #ifdef ENABLE_DOT11D |
522 | if(channel_map[ieee->current_network.channel] == 1) | 522 | if(channel_map[ieee->current_network.channel] == 1) |
523 | #endif | 523 | #endif |
@@ -568,7 +568,7 @@ void ieee80211_beacons_stop(struct ieee80211_device *ieee) | |||
568 | void ieee80211_stop_send_beacons(struct ieee80211_device *ieee) | 568 | void ieee80211_stop_send_beacons(struct ieee80211_device *ieee) |
569 | { | 569 | { |
570 | if(ieee->stop_send_beacons) | 570 | if(ieee->stop_send_beacons) |
571 | ieee->stop_send_beacons(ieee->dev); | 571 | ieee->stop_send_beacons(ieee); |
572 | if (ieee->softmac_features & IEEE_SOFTMAC_BEACONS) | 572 | if (ieee->softmac_features & IEEE_SOFTMAC_BEACONS) |
573 | ieee80211_beacons_stop(ieee); | 573 | ieee80211_beacons_stop(ieee); |
574 | } | 574 | } |
@@ -577,7 +577,7 @@ void ieee80211_stop_send_beacons(struct ieee80211_device *ieee) | |||
577 | void ieee80211_start_send_beacons(struct ieee80211_device *ieee) | 577 | void ieee80211_start_send_beacons(struct ieee80211_device *ieee) |
578 | { | 578 | { |
579 | if(ieee->start_send_beacons) | 579 | if(ieee->start_send_beacons) |
580 | ieee->start_send_beacons(ieee->dev); | 580 | ieee->start_send_beacons(ieee); |
581 | if(ieee->softmac_features & IEEE_SOFTMAC_BEACONS) | 581 | if(ieee->softmac_features & IEEE_SOFTMAC_BEACONS) |
582 | ieee80211_beacons_start(ieee); | 582 | ieee80211_beacons_start(ieee); |
583 | } | 583 | } |
@@ -1390,7 +1390,7 @@ void ieee80211_associate_complete_wq(struct work_struct *work) | |||
1390 | } | 1390 | } |
1391 | 1391 | ||
1392 | if (ieee->data_hard_resume) | 1392 | if (ieee->data_hard_resume) |
1393 | ieee->data_hard_resume(ieee->dev); | 1393 | ieee->data_hard_resume(ieee); |
1394 | netif_carrier_on(ieee->dev); | 1394 | netif_carrier_on(ieee->dev); |
1395 | } | 1395 | } |
1396 | 1396 | ||
@@ -1414,7 +1414,7 @@ void ieee80211_associate_procedure_wq(struct work_struct *work) | |||
1414 | down(&ieee->wx_sem); | 1414 | down(&ieee->wx_sem); |
1415 | 1415 | ||
1416 | if (ieee->data_hard_stop) | 1416 | if (ieee->data_hard_stop) |
1417 | ieee->data_hard_stop(ieee->dev); | 1417 | ieee->data_hard_stop(ieee); |
1418 | 1418 | ||
1419 | ieee80211_stop_scan(ieee); | 1419 | ieee80211_stop_scan(ieee); |
1420 | printk("===>%s(), chan:%d\n", __FUNCTION__, ieee->current_network.channel); | 1420 | printk("===>%s(), chan:%d\n", __FUNCTION__, ieee->current_network.channel); |
@@ -2221,7 +2221,7 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device * | |||
2221 | }else{ | 2221 | }else{ |
2222 | ieee->softmac_data_hard_start_xmit( | 2222 | ieee->softmac_data_hard_start_xmit( |
2223 | txb->fragments[i], | 2223 | txb->fragments[i], |
2224 | ieee->dev,ieee->rate); | 2224 | ieee, ieee->rate); |
2225 | } | 2225 | } |
2226 | } | 2226 | } |
2227 | 2227 | ||
@@ -2244,7 +2244,7 @@ void ieee80211_resume_tx(struct ieee80211_device *ieee) | |||
2244 | 2244 | ||
2245 | ieee->softmac_data_hard_start_xmit( | 2245 | ieee->softmac_data_hard_start_xmit( |
2246 | ieee->tx_pending.txb->fragments[i], | 2246 | ieee->tx_pending.txb->fragments[i], |
2247 | ieee->dev,ieee->rate); | 2247 | ieee, ieee->rate); |
2248 | ieee->stats.tx_packets++; | 2248 | ieee->stats.tx_packets++; |
2249 | } | 2249 | } |
2250 | } | 2250 | } |
@@ -2294,7 +2294,7 @@ void ieee80211_rtl_wake_queue(struct ieee80211_device *ieee) | |||
2294 | else | 2294 | else |
2295 | ieee->seq_ctrl[0]++; | 2295 | ieee->seq_ctrl[0]++; |
2296 | 2296 | ||
2297 | ieee->softmac_data_hard_start_xmit(skb,ieee->dev,ieee->basic_rate); | 2297 | ieee->softmac_data_hard_start_xmit(skb, ieee, ieee->basic_rate); |
2298 | } | 2298 | } |
2299 | } | 2299 | } |
2300 | if (!ieee->queue_stop && ieee->tx_pending.txb) | 2300 | if (!ieee->queue_stop && ieee->tx_pending.txb) |
@@ -2348,13 +2348,13 @@ void ieee80211_start_master_bss(struct ieee80211_device *ieee) | |||
2348 | 2348 | ||
2349 | memcpy(ieee->current_network.bssid, ieee->dev->dev_addr, ETH_ALEN); | 2349 | memcpy(ieee->current_network.bssid, ieee->dev->dev_addr, ETH_ALEN); |
2350 | 2350 | ||
2351 | ieee->set_chan(ieee->dev, ieee->current_network.channel); | 2351 | ieee->set_chan(ieee, ieee->current_network.channel); |
2352 | ieee->state = IEEE80211_LINKED; | 2352 | ieee->state = IEEE80211_LINKED; |
2353 | ieee->link_change(ieee->dev); | 2353 | ieee->link_change(ieee->dev); |
2354 | notify_wx_assoc_event(ieee); | 2354 | notify_wx_assoc_event(ieee); |
2355 | 2355 | ||
2356 | if (ieee->data_hard_resume) | 2356 | if (ieee->data_hard_resume) |
2357 | ieee->data_hard_resume(ieee->dev); | 2357 | ieee->data_hard_resume(ieee); |
2358 | 2358 | ||
2359 | netif_carrier_on(ieee->dev); | 2359 | netif_carrier_on(ieee->dev); |
2360 | } | 2360 | } |
@@ -2364,7 +2364,7 @@ void ieee80211_start_monitor_mode(struct ieee80211_device *ieee) | |||
2364 | if(ieee->raw_tx){ | 2364 | if(ieee->raw_tx){ |
2365 | 2365 | ||
2366 | if (ieee->data_hard_resume) | 2366 | if (ieee->data_hard_resume) |
2367 | ieee->data_hard_resume(ieee->dev); | 2367 | ieee->data_hard_resume(ieee); |
2368 | 2368 | ||
2369 | netif_carrier_on(ieee->dev); | 2369 | netif_carrier_on(ieee->dev); |
2370 | } | 2370 | } |
@@ -2467,7 +2467,7 @@ void ieee80211_start_ibss_wq(struct work_struct *work) | |||
2467 | 2467 | ||
2468 | ieee->state = IEEE80211_LINKED; | 2468 | ieee->state = IEEE80211_LINKED; |
2469 | 2469 | ||
2470 | ieee->set_chan(ieee->dev, ieee->current_network.channel); | 2470 | ieee->set_chan(ieee, ieee->current_network.channel); |
2471 | ieee->link_change(ieee->dev); | 2471 | ieee->link_change(ieee->dev); |
2472 | 2472 | ||
2473 | notify_wx_assoc_event(ieee); | 2473 | notify_wx_assoc_event(ieee); |
@@ -2475,7 +2475,7 @@ void ieee80211_start_ibss_wq(struct work_struct *work) | |||
2475 | ieee80211_start_send_beacons(ieee); | 2475 | ieee80211_start_send_beacons(ieee); |
2476 | 2476 | ||
2477 | if (ieee->data_hard_resume) | 2477 | if (ieee->data_hard_resume) |
2478 | ieee->data_hard_resume(ieee->dev); | 2478 | ieee->data_hard_resume(ieee); |
2479 | netif_carrier_on(ieee->dev); | 2479 | netif_carrier_on(ieee->dev); |
2480 | 2480 | ||
2481 | up(&ieee->wx_sem); | 2481 | up(&ieee->wx_sem); |
@@ -2540,7 +2540,7 @@ void ieee80211_disassociate(struct ieee80211_device *ieee) | |||
2540 | ieee80211_reset_queue(ieee); | 2540 | ieee80211_reset_queue(ieee); |
2541 | 2541 | ||
2542 | if (ieee->data_hard_stop) | 2542 | if (ieee->data_hard_stop) |
2543 | ieee->data_hard_stop(ieee->dev); | 2543 | ieee->data_hard_stop(ieee); |
2544 | #ifdef ENABLE_DOT11D | 2544 | #ifdef ENABLE_DOT11D |
2545 | if(IS_DOT11D_ENABLE(ieee)) | 2545 | if(IS_DOT11D_ENABLE(ieee)) |
2546 | Dot11d_Reset(ieee); | 2546 | Dot11d_Reset(ieee); |
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c index 1456387795b..427dfc1d0ff 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c | |||
@@ -316,7 +316,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work) | |||
316 | #endif | 316 | #endif |
317 | 317 | ||
318 | if (ieee->data_hard_stop) | 318 | if (ieee->data_hard_stop) |
319 | ieee->data_hard_stop(ieee->dev); | 319 | ieee->data_hard_stop(ieee); |
320 | 320 | ||
321 | ieee80211_stop_send_beacons(ieee); | 321 | ieee80211_stop_send_beacons(ieee); |
322 | 322 | ||
@@ -360,7 +360,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work) | |||
360 | ieee->LinkDetectInfo.NumRecvDataInPeriod= 1; | 360 | ieee->LinkDetectInfo.NumRecvDataInPeriod= 1; |
361 | } | 361 | } |
362 | if (ieee->data_hard_resume) | 362 | if (ieee->data_hard_resume) |
363 | ieee->data_hard_resume(ieee->dev); | 363 | ieee->data_hard_resume(ieee); |
364 | 364 | ||
365 | if(ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER) | 365 | if(ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER) |
366 | ieee80211_start_send_beacons(ieee); | 366 | ieee80211_start_send_beacons(ieee); |
@@ -479,7 +479,7 @@ out: | |||
479 | { | 479 | { |
480 | if(prev == 0 && ieee->raw_tx){ | 480 | if(prev == 0 && ieee->raw_tx){ |
481 | if (ieee->data_hard_resume) | 481 | if (ieee->data_hard_resume) |
482 | ieee->data_hard_resume(ieee->dev); | 482 | ieee->data_hard_resume(ieee); |
483 | 483 | ||
484 | netif_carrier_on(ieee->dev); | 484 | netif_carrier_on(ieee->dev); |
485 | } | 485 | } |
diff --git a/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c index a4415972a60..5e0b0b55f24 100644 --- a/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c | |||
@@ -1716,15 +1716,15 @@ void HTSetConnectBwModeCallback(struct ieee80211_device* ieee) | |||
1716 | if(pHTInfo->bCurBW40MHz) | 1716 | if(pHTInfo->bCurBW40MHz) |
1717 | { | 1717 | { |
1718 | if(pHTInfo->CurSTAExtChnlOffset==HT_EXTCHNL_OFFSET_UPPER) | 1718 | if(pHTInfo->CurSTAExtChnlOffset==HT_EXTCHNL_OFFSET_UPPER) |
1719 | ieee->set_chan(ieee->dev, ieee->current_network.channel+2); | 1719 | ieee->set_chan(ieee, ieee->current_network.channel+2); |
1720 | else if(pHTInfo->CurSTAExtChnlOffset==HT_EXTCHNL_OFFSET_LOWER) | 1720 | else if(pHTInfo->CurSTAExtChnlOffset==HT_EXTCHNL_OFFSET_LOWER) |
1721 | ieee->set_chan(ieee->dev, ieee->current_network.channel-2); | 1721 | ieee->set_chan(ieee, ieee->current_network.channel-2); |
1722 | else | 1722 | else |
1723 | ieee->set_chan(ieee->dev, ieee->current_network.channel); | 1723 | ieee->set_chan(ieee, ieee->current_network.channel); |
1724 | 1724 | ||
1725 | ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20_40, pHTInfo->CurSTAExtChnlOffset); | 1725 | ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20_40, pHTInfo->CurSTAExtChnlOffset); |
1726 | } else { | 1726 | } else { |
1727 | ieee->set_chan(ieee->dev, ieee->current_network.channel); | 1727 | ieee->set_chan(ieee, ieee->current_network.channel); |
1728 | ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT); | 1728 | ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT); |
1729 | } | 1729 | } |
1730 | 1730 | ||
diff --git a/drivers/staging/rtl8192e/r8192E.h b/drivers/staging/rtl8192e/r8192E.h index d59fc0e796d..9ff0548f188 100644 --- a/drivers/staging/rtl8192e/r8192E.h +++ b/drivers/staging/rtl8192e/r8192E.h | |||
@@ -916,8 +916,8 @@ typedef struct r8192_priv | |||
916 | struct semaphore rf_sem; //used to lock rf write operation added by wb, modified by david | 916 | struct semaphore rf_sem; //used to lock rf write operation added by wb, modified by david |
917 | u8 rf_type; /* 0 means 1T2R, 1 means 2T4R */ | 917 | u8 rf_type; /* 0 means 1T2R, 1 means 2T4R */ |
918 | 918 | ||
919 | short (*rf_set_sens)(struct net_device *dev,short sens); | 919 | short (*rf_set_sens)(struct net_device *dev, short sens); |
920 | u8 (*rf_set_chan)(struct net_device *dev,u8 ch); | 920 | u8 (*rf_set_chan)(struct ieee80211_device *ieee80211, u8 ch); |
921 | short promisc; | 921 | short promisc; |
922 | /* stats */ | 922 | /* stats */ |
923 | struct Stats stats; | 923 | struct Stats stats; |
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index eb956eab889..c392f19b0bd 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c | |||
@@ -96,8 +96,8 @@ static struct pci_driver rtl8192_pci_driver = { | |||
96 | #endif | 96 | #endif |
97 | }; | 97 | }; |
98 | 98 | ||
99 | static void rtl8192_start_beacon(struct net_device *dev); | 99 | static void rtl8192_start_beacon(struct ieee80211_device *ieee80211); |
100 | static void rtl8192_stop_beacon(struct net_device *dev); | 100 | static void rtl8192_stop_beacon(struct ieee80211_device *ieee80211); |
101 | static void rtl819x_watchdog_wqcallback(struct work_struct *work); | 101 | static void rtl819x_watchdog_wqcallback(struct work_struct *work); |
102 | static void rtl8192_irq_rx_tasklet(unsigned long arg); | 102 | static void rtl8192_irq_rx_tasklet(unsigned long arg); |
103 | static void rtl8192_irq_tx_tasklet(unsigned long arg); | 103 | static void rtl8192_irq_tx_tasklet(unsigned long arg); |
@@ -648,16 +648,16 @@ static void rtl8192_update_msr(struct r8192_priv *priv) | |||
648 | write_nic_byte(priv, MSR, msr); | 648 | write_nic_byte(priv, MSR, msr); |
649 | } | 649 | } |
650 | 650 | ||
651 | static void rtl8192_set_chan(struct net_device *dev,short ch) | 651 | static void rtl8192_set_chan(struct ieee80211_device *ieee80211, short ch) |
652 | { | 652 | { |
653 | struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); | 653 | struct r8192_priv *priv = ieee80211_priv(ieee80211->dev); |
654 | 654 | ||
655 | priv->chan = ch; | 655 | priv->chan = ch; |
656 | 656 | ||
657 | /* need to implement rf set channel here WB */ | 657 | /* need to implement rf set channel here WB */ |
658 | 658 | ||
659 | if (priv->rf_set_chan) | 659 | if (priv->rf_set_chan) |
660 | priv->rf_set_chan(dev, priv->chan); | 660 | priv->rf_set_chan(ieee80211, priv->chan); |
661 | } | 661 | } |
662 | 662 | ||
663 | static void rtl8192_rx_enable(struct r8192_priv *priv) | 663 | static void rtl8192_rx_enable(struct r8192_priv *priv) |
@@ -803,11 +803,11 @@ static void rtl8192_halt_adapter(struct r8192_priv *priv, bool reset) | |||
803 | skb_queue_purge(&priv->skb_queue); | 803 | skb_queue_purge(&priv->skb_queue); |
804 | } | 804 | } |
805 | 805 | ||
806 | static void rtl8192_data_hard_stop(struct net_device *dev) | 806 | static void rtl8192_data_hard_stop(struct ieee80211_device *ieee80211) |
807 | { | 807 | { |
808 | } | 808 | } |
809 | 809 | ||
810 | static void rtl8192_data_hard_resume(struct net_device *dev) | 810 | static void rtl8192_data_hard_resume(struct ieee80211_device *ieee80211) |
811 | { | 811 | { |
812 | } | 812 | } |
813 | 813 | ||
@@ -815,9 +815,10 @@ static void rtl8192_data_hard_resume(struct net_device *dev) | |||
815 | * this function TX data frames when the ieee80211 stack requires this. | 815 | * this function TX data frames when the ieee80211 stack requires this. |
816 | * It checks also if we need to stop the ieee tx queue, eventually do it | 816 | * It checks also if we need to stop the ieee tx queue, eventually do it |
817 | */ | 817 | */ |
818 | static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rate) | 818 | static void rtl8192_hard_data_xmit(struct sk_buff *skb, |
819 | struct ieee80211_device *ieee80211, int rate) | ||
819 | { | 820 | { |
820 | struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); | 821 | struct r8192_priv *priv = ieee80211_priv(ieee80211->dev); |
821 | int ret; | 822 | int ret; |
822 | cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); | 823 | cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); |
823 | u8 queue_index = tcb_desc->queue_index; | 824 | u8 queue_index = tcb_desc->queue_index; |
@@ -831,7 +832,7 @@ static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, | |||
831 | return; | 832 | return; |
832 | } | 833 | } |
833 | 834 | ||
834 | memcpy(skb->cb, &dev, sizeof(dev)); | 835 | memcpy(skb->cb, &ieee80211->dev, sizeof(ieee80211->dev)); |
835 | 836 | ||
836 | skb_push(skb, priv->ieee80211->tx_headroom); | 837 | skb_push(skb, priv->ieee80211->tx_headroom); |
837 | ret = rtl8192_tx(priv, skb); | 838 | ret = rtl8192_tx(priv, skb); |
@@ -851,9 +852,9 @@ static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, | |||
851 | * If the ring is full packet are dropped (for data frame the queue | 852 | * If the ring is full packet are dropped (for data frame the queue |
852 | * is stopped before this can happen). | 853 | * is stopped before this can happen). |
853 | */ | 854 | */ |
854 | static int rtl8192_hard_start_xmit(struct sk_buff *skb,struct net_device *dev) | 855 | static int rtl8192_hard_start_xmit(struct sk_buff *skb, struct ieee80211_device *ieee80211) |
855 | { | 856 | { |
856 | struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); | 857 | struct r8192_priv *priv = ieee80211_priv(ieee80211->dev); |
857 | int ret; | 858 | int ret; |
858 | cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); | 859 | cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); |
859 | u8 queue_index = tcb_desc->queue_index; | 860 | u8 queue_index = tcb_desc->queue_index; |
@@ -866,7 +867,7 @@ static int rtl8192_hard_start_xmit(struct sk_buff *skb,struct net_device *dev) | |||
866 | } | 867 | } |
867 | } | 868 | } |
868 | 869 | ||
869 | memcpy(skb->cb, &dev, sizeof(dev)); | 870 | memcpy(skb->cb, &ieee80211->dev, sizeof(ieee80211->dev)); |
870 | if (queue_index == TXCMD_QUEUE) { | 871 | if (queue_index == TXCMD_QUEUE) { |
871 | rtl819xE_tx_cmd(priv, skb); | 872 | rtl819xE_tx_cmd(priv, skb); |
872 | ret = 0; | 873 | ret = 0; |
@@ -876,7 +877,7 @@ static int rtl8192_hard_start_xmit(struct sk_buff *skb,struct net_device *dev) | |||
876 | tcb_desc->bTxDisableRateFallBack = 1; | 877 | tcb_desc->bTxDisableRateFallBack = 1; |
877 | tcb_desc->bTxUseDriverAssingedRate = 1; | 878 | tcb_desc->bTxUseDriverAssingedRate = 1; |
878 | tcb_desc->bTxEnableFwCalcDur = 1; | 879 | tcb_desc->bTxEnableFwCalcDur = 1; |
879 | skb_push(skb, priv->ieee80211->tx_headroom); | 880 | skb_push(skb, ieee80211->tx_headroom); |
880 | ret = rtl8192_tx(priv, skb); | 881 | ret = rtl8192_tx(priv, skb); |
881 | if (ret != 0) { | 882 | if (ret != 0) { |
882 | kfree_skb(skb); | 883 | kfree_skb(skb); |
@@ -918,7 +919,7 @@ static void rtl8192_tx_isr(struct r8192_priv *priv, int prio) | |||
918 | } | 919 | } |
919 | } | 920 | } |
920 | 921 | ||
921 | static void rtl8192_stop_beacon(struct net_device *dev) | 922 | static void rtl8192_stop_beacon(struct ieee80211_device *ieee80211) |
922 | { | 923 | { |
923 | } | 924 | } |
924 | 925 | ||
@@ -1927,8 +1928,8 @@ static void rtl8192_init_priv_variable(struct r8192_priv *priv) | |||
1927 | priv->ieee80211->modulation = IEEE80211_CCK_MODULATION | IEEE80211_OFDM_MODULATION; | 1928 | priv->ieee80211->modulation = IEEE80211_CCK_MODULATION | IEEE80211_OFDM_MODULATION; |
1928 | priv->ieee80211->host_encrypt = 1; | 1929 | priv->ieee80211->host_encrypt = 1; |
1929 | priv->ieee80211->host_decrypt = 1; | 1930 | priv->ieee80211->host_decrypt = 1; |
1930 | priv->ieee80211->start_send_beacons = rtl8192_start_beacon;//+by david 081107 | 1931 | priv->ieee80211->start_send_beacons = rtl8192_start_beacon; |
1931 | priv->ieee80211->stop_send_beacons = rtl8192_stop_beacon;//+by david 081107 | 1932 | priv->ieee80211->stop_send_beacons = rtl8192_stop_beacon; |
1932 | priv->ieee80211->softmac_hard_start_xmit = rtl8192_hard_start_xmit; | 1933 | priv->ieee80211->softmac_hard_start_xmit = rtl8192_hard_start_xmit; |
1933 | priv->ieee80211->set_chan = rtl8192_set_chan; | 1934 | priv->ieee80211->set_chan = rtl8192_set_chan; |
1934 | priv->ieee80211->link_change = rtl8192_link_change; | 1935 | priv->ieee80211->link_change = rtl8192_link_change; |
@@ -2853,9 +2854,9 @@ static void rtl8192_prepare_beacon(unsigned long arg) | |||
2853 | * rtl8192_beacon_tx_enable(). rtl8192_beacon_tx_disable() might | 2854 | * rtl8192_beacon_tx_enable(). rtl8192_beacon_tx_disable() might |
2854 | * be used to stop beacon transmission | 2855 | * be used to stop beacon transmission |
2855 | */ | 2856 | */ |
2856 | static void rtl8192_start_beacon(struct net_device *dev) | 2857 | static void rtl8192_start_beacon(struct ieee80211_device *ieee80211) |
2857 | { | 2858 | { |
2858 | struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); | 2859 | struct r8192_priv *priv = ieee80211_priv(ieee80211->dev); |
2859 | struct ieee80211_network *net = &priv->ieee80211->current_network; | 2860 | struct ieee80211_network *net = &priv->ieee80211->current_network; |
2860 | u16 BcnTimeCfg = 0; | 2861 | u16 BcnTimeCfg = 0; |
2861 | u16 BcnCW = 6; | 2862 | u16 BcnCW = 6; |
@@ -4306,7 +4307,7 @@ static void rtl8192_tx_resume(struct r8192_priv *priv) | |||
4306 | /* 1. dequeue the packet from the wait queue */ | 4307 | /* 1. dequeue the packet from the wait queue */ |
4307 | skb = skb_dequeue(&ieee->skb_waitQ[i]); | 4308 | skb = skb_dequeue(&ieee->skb_waitQ[i]); |
4308 | /* 2. tx the packet directly */ | 4309 | /* 2. tx the packet directly */ |
4309 | ieee->softmac_data_hard_start_xmit(skb, dev, 0); | 4310 | ieee->softmac_data_hard_start_xmit(skb, ieee, 0); |
4310 | } | 4311 | } |
4311 | } | 4312 | } |
4312 | } | 4313 | } |
diff --git a/drivers/staging/rtl8192e/r819xE_cmdpkt.c b/drivers/staging/rtl8192e/r819xE_cmdpkt.c index d5e1e7ee7c5..a8310c92fd8 100644 --- a/drivers/staging/rtl8192e/r819xE_cmdpkt.c +++ b/drivers/staging/rtl8192e/r819xE_cmdpkt.c | |||
@@ -104,7 +104,7 @@ RT_STATUS cmpk_message_handle_tx( | |||
104 | *seg_ptr++ = ((i+3)<frag_length)?code_virtual_address[i+0]:0; | 104 | *seg_ptr++ = ((i+3)<frag_length)?code_virtual_address[i+0]:0; |
105 | } | 105 | } |
106 | skb_put(skb, i); | 106 | skb_put(skb, i); |
107 | priv->ieee80211->softmac_hard_start_xmit(skb,dev); | 107 | priv->ieee80211->softmac_hard_start_xmit(skb, priv->ieee80211); |
108 | 108 | ||
109 | code_virtual_address += frag_length; | 109 | code_virtual_address += frag_length; |
110 | frag_offset += frag_length; | 110 | frag_offset += frag_length; |
diff --git a/drivers/staging/rtl8192e/r819xE_firmware.c b/drivers/staging/rtl8192e/r819xE_firmware.c index d1da2697cfe..af99d0edfc8 100644 --- a/drivers/staging/rtl8192e/r819xE_firmware.c +++ b/drivers/staging/rtl8192e/r819xE_firmware.c | |||
@@ -96,7 +96,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, | |||
96 | } | 96 | } |
97 | tcb_desc->txbuf_size = (u16)i; | 97 | tcb_desc->txbuf_size = (u16)i; |
98 | skb_put(skb, i); | 98 | skb_put(skb, i); |
99 | priv->ieee80211->softmac_hard_start_xmit(skb, dev); | 99 | priv->ieee80211->softmac_hard_start_xmit(skb, priv->ieee80211); |
100 | 100 | ||
101 | code_virtual_address += frag_length; | 101 | code_virtual_address += frag_length; |
102 | frag_offset += frag_length; | 102 | frag_offset += frag_length; |
diff --git a/drivers/staging/rtl8192e/r819xE_phy.c b/drivers/staging/rtl8192e/r819xE_phy.c index f0975c61775..338fb04a5f3 100644 --- a/drivers/staging/rtl8192e/r819xE_phy.c +++ b/drivers/staging/rtl8192e/r819xE_phy.c | |||
@@ -1850,9 +1850,10 @@ void rtl8192_SwChnl_WorkItem(struct r8192_priv *priv) | |||
1850 | * return: return code show if workitem is scheduled(1:pass, 0:fail) | 1850 | * return: return code show if workitem is scheduled(1:pass, 0:fail) |
1851 | * Note: Delay may be required for RF configuration | 1851 | * Note: Delay may be required for RF configuration |
1852 | * ***************************************************************************/ | 1852 | * ***************************************************************************/ |
1853 | u8 rtl8192_phy_SwChnl(struct net_device* dev, u8 channel) | 1853 | u8 rtl8192_phy_SwChnl(struct ieee80211_device *ieee80211, u8 channel) |
1854 | { | 1854 | { |
1855 | struct r8192_priv *priv = ieee80211_priv(dev); | 1855 | struct r8192_priv *priv = ieee80211_priv(ieee80211->dev); |
1856 | |||
1856 | RT_TRACE(COMP_PHY, "=====>%s()\n", __FUNCTION__); | 1857 | RT_TRACE(COMP_PHY, "=====>%s()\n", __FUNCTION__); |
1857 | if(!priv->up) | 1858 | if(!priv->up) |
1858 | return false; | 1859 | return false; |
diff --git a/drivers/staging/rtl8192e/r819xE_phy.h b/drivers/staging/rtl8192e/r819xE_phy.h index 46008eee512..faab39b70eb 100644 --- a/drivers/staging/rtl8192e/r819xE_phy.h +++ b/drivers/staging/rtl8192e/r819xE_phy.h | |||
@@ -117,7 +117,7 @@ void rtl8192_phy_updateInitGain(struct r8192_priv *priv); | |||
117 | u8 rtl8192_phy_ConfigRFWithHeaderFile(struct r8192_priv *priv, | 117 | u8 rtl8192_phy_ConfigRFWithHeaderFile(struct r8192_priv *priv, |
118 | RF90_RADIO_PATH_E eRFPath); | 118 | RF90_RADIO_PATH_E eRFPath); |
119 | 119 | ||
120 | u8 rtl8192_phy_SwChnl(struct net_device *dev, u8 channel); | 120 | u8 rtl8192_phy_SwChnl(struct ieee80211_device *ieee80211, u8 channel); |
121 | 121 | ||
122 | void rtl8192_SetBWMode(struct net_device *dev, | 122 | void rtl8192_SetBWMode(struct net_device *dev, |
123 | HT_CHANNEL_WIDTH Bandwidth, HT_EXTCHNL_OFFSET Offset); | 123 | HT_CHANNEL_WIDTH Bandwidth, HT_EXTCHNL_OFFSET Offset); |