瀏覽代碼

staging: rtl8192e: Pass ieee80211_device to callbacks

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mike McCormack 14 年之前
父節點
當前提交
ad44d2a1c5

+ 4 - 4
drivers/staging/rtl8192e/ieee80211/ieee80211.h

@@ -2165,16 +2165,16 @@ struct ieee80211_device {
 	 * The fucntion start_scan should initiate the background
 	 * The fucntion start_scan should initiate the background
 	 * scanning and can't sleep.
 	 * scanning and can't sleep.
 	 */
 	 */
-	void (*scan_syncro)(struct net_device *dev);
-	void (*start_scan)(struct net_device *dev);
-	void (*stop_scan)(struct net_device *dev);
+	void (*scan_syncro)(struct ieee80211_device *ieee80211);
+	void (*start_scan)(struct ieee80211_device *ieee80211);
+	void (*stop_scan)(struct ieee80211_device *ieee80211);
 
 
 	/* indicate the driver that the link state is changed
 	/* indicate the driver that the link state is changed
 	 * for example it may indicate the card is associated now.
 	 * for example it may indicate the card is associated now.
 	 * Driver might be interested in this to apply RX filter
 	 * Driver might be interested in this to apply RX filter
 	 * rules or simply light the LINK led
 	 * rules or simply light the LINK led
 	 */
 	 */
-	void (*link_change)(struct net_device *dev);
+	void (*link_change)(struct ieee80211_device *ieee80211);
 
 
 	/* these two function indicates to the HW when to start
 	/* these two function indicates to the HW when to start
 	 * and stop to send beacons. This is used when the
 	 * and stop to send beacons. This is used when the

+ 7 - 7
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c

@@ -601,7 +601,7 @@ void ieee80211_stop_scan(struct ieee80211_device *ieee)
 	if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
 	if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
 		ieee80211_softmac_stop_scan(ieee);
 		ieee80211_softmac_stop_scan(ieee);
 	else
 	else
-		ieee->stop_scan(ieee->dev);
+		ieee->stop_scan(ieee);
 }
 }
 
 
 /* called with ieee->lock held */
 /* called with ieee->lock held */
@@ -627,7 +627,7 @@ void ieee80211_rtl_start_scan(struct ieee80211_device *ieee)
 			queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, 0);
 			queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, 0);
 		}
 		}
 	}else
 	}else
-		ieee->start_scan(ieee->dev);
+		ieee->start_scan(ieee);
 
 
 }
 }
 
 
@@ -647,7 +647,7 @@ void ieee80211_start_scan_syncro(struct ieee80211_device *ieee)
 	if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
 	if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
 		ieee80211_softmac_scan_syncro(ieee);
 		ieee80211_softmac_scan_syncro(ieee);
 	else
 	else
-		ieee->scan_syncro(ieee->dev);
+		ieee->scan_syncro(ieee);
 
 
 }
 }
 
 
@@ -1378,7 +1378,7 @@ void ieee80211_associate_complete_wq(struct work_struct *work)
 		ieee->LinkDetectInfo.NumRecvBcnInPeriod = 1;
 		ieee->LinkDetectInfo.NumRecvBcnInPeriod = 1;
 		ieee->LinkDetectInfo.NumRecvDataInPeriod= 1;
 		ieee->LinkDetectInfo.NumRecvDataInPeriod= 1;
 	}
 	}
-	ieee->link_change(ieee->dev);
+	ieee->link_change(ieee);
 	if(ieee->is_silent_reset == 0){
 	if(ieee->is_silent_reset == 0){
 		printk("============>normal associate\n");
 		printk("============>normal associate\n");
 	notify_wx_assoc_event(ieee);
 	notify_wx_assoc_event(ieee);
@@ -2350,7 +2350,7 @@ void ieee80211_start_master_bss(struct ieee80211_device *ieee)
 
 
 	ieee->set_chan(ieee, ieee->current_network.channel);
 	ieee->set_chan(ieee, ieee->current_network.channel);
 	ieee->state = IEEE80211_LINKED;
 	ieee->state = IEEE80211_LINKED;
-	ieee->link_change(ieee->dev);
+	ieee->link_change(ieee);
 	notify_wx_assoc_event(ieee);
 	notify_wx_assoc_event(ieee);
 
 
 	if (ieee->data_hard_resume)
 	if (ieee->data_hard_resume)
@@ -2468,7 +2468,7 @@ void ieee80211_start_ibss_wq(struct work_struct *work)
 	ieee->state = IEEE80211_LINKED;
 	ieee->state = IEEE80211_LINKED;
 
 
 	ieee->set_chan(ieee, ieee->current_network.channel);
 	ieee->set_chan(ieee, ieee->current_network.channel);
-	ieee->link_change(ieee->dev);
+	ieee->link_change(ieee);
 
 
 	notify_wx_assoc_event(ieee);
 	notify_wx_assoc_event(ieee);
 
 
@@ -2546,7 +2546,7 @@ void ieee80211_disassociate(struct ieee80211_device *ieee)
 		Dot11d_Reset(ieee);
 		Dot11d_Reset(ieee);
 #endif
 #endif
 	ieee->is_set_key = false;
 	ieee->is_set_key = false;
-	ieee->link_change(ieee->dev);
+	ieee->link_change(ieee);
 	if (ieee->state == IEEE80211_LINKED ||
 	if (ieee->state == IEEE80211_LINKED ||
 	    ieee->state == IEEE80211_ASSOCIATING) {
 	    ieee->state == IEEE80211_ASSOCIATING) {
 		ieee->state = IEEE80211_NOLINK;
 		ieee->state = IEEE80211_NOLINK;

+ 2 - 2
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c

@@ -321,7 +321,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
 	ieee80211_stop_send_beacons(ieee);
 	ieee80211_stop_send_beacons(ieee);
 
 
 	ieee->state = IEEE80211_LINKED_SCANNING;
 	ieee->state = IEEE80211_LINKED_SCANNING;
-	ieee->link_change(ieee->dev);
+	ieee->link_change(ieee);
 	ieee->InitialGainHandler(ieee->dev,IG_Backup);
 	ieee->InitialGainHandler(ieee->dev,IG_Backup);
 	if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT && ieee->pHTInfo->bCurBW40MHz) {
 	if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT && ieee->pHTInfo->bCurBW40MHz) {
 		b40M = 1;
 		b40M = 1;
@@ -346,7 +346,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
 
 
 	ieee->InitialGainHandler(ieee->dev,IG_Restore);
 	ieee->InitialGainHandler(ieee->dev,IG_Restore);
 	ieee->state = IEEE80211_LINKED;
 	ieee->state = IEEE80211_LINKED;
-	ieee->link_change(ieee->dev);
+	ieee->link_change(ieee);
 
 
 #ifdef ENABLE_LPS
 #ifdef ENABLE_LPS
 	/* Notify AP that I wake up again */
 	/* Notify AP that I wake up again */

+ 3 - 4
drivers/staging/rtl8192e/r8192E_core.c

@@ -1464,10 +1464,9 @@ static void rtl8192_pci_resetdescring(struct r8192_priv *priv)
     }
     }
 }
 }
 
 
-static void rtl8192_link_change(struct net_device *dev)
+static void rtl8192_link_change(struct ieee80211_device *ieee)
 {
 {
-	struct r8192_priv *priv = ieee80211_priv(dev);
-	struct ieee80211_device* ieee = priv->ieee80211;
+	struct r8192_priv *priv = ieee80211_priv(ieee->dev);
 
 
 	if (ieee->state == IEEE80211_LINKED)
 	if (ieee->state == IEEE80211_LINKED)
 	{
 	{
@@ -3322,7 +3321,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
 				RemovePeerTS(priv->ieee80211,priv->ieee80211->current_network.bssid);
 				RemovePeerTS(priv->ieee80211,priv->ieee80211->current_network.bssid);
 				ieee->is_roaming = true;
 				ieee->is_roaming = true;
 				ieee->is_set_key = false;
 				ieee->is_set_key = false;
-				ieee->link_change(dev);
+				ieee->link_change(ieee);
 				queue_work(ieee->wq, &ieee->associate_procedure_wq);
 				queue_work(ieee->wq, &ieee->associate_procedure_wq);
 			}
 			}
 		}
 		}