staging: rtl8192e: Pass ieee80211_device to callbacks
authorMike McCormack <mikem@ring3k.org>
Thu, 10 Mar 2011 13:34:06 +0000 (22:34 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Mar 2011 19:24:46 +0000 (12:24 -0700)
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rtl8192e/ieee80211/ieee80211.h
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c
drivers/staging/rtl8192e/r8192E_core.c

index af6465334036ea49d804478123939577e862a77d..527c368897c0f9d90b9ab55ac43177dee5c32718 100644 (file)
@@ -2165,16 +2165,16 @@ struct ieee80211_device {
         * The fucntion start_scan should initiate the background
         * 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
         * for example it may indicate the card is associated now.
         * Driver might be interested in this to apply RX filter
         * 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
         * and stop to send beacons. This is used when the
index 7888cfe383f84a50e3233fd0734e9d16495bbb81..92cd71c3217cbd5a365b2f888cf7f415e858d6e4 100644 (file)
@@ -601,7 +601,7 @@ void ieee80211_stop_scan(struct ieee80211_device *ieee)
        if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
                ieee80211_softmac_stop_scan(ieee);
        else
-               ieee->stop_scan(ieee->dev);
+               ieee->stop_scan(ieee);
 }
 
 /* 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);
                }
        }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)
                ieee80211_softmac_scan_syncro(ieee);
        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.NumRecvDataInPeriod= 1;
        }
-       ieee->link_change(ieee->dev);
+       ieee->link_change(ieee);
        if(ieee->is_silent_reset == 0){
                printk("============>normal associate\n");
        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->state = IEEE80211_LINKED;
-       ieee->link_change(ieee->dev);
+       ieee->link_change(ieee);
        notify_wx_assoc_event(ieee);
 
        if (ieee->data_hard_resume)
@@ -2468,7 +2468,7 @@ void ieee80211_start_ibss_wq(struct work_struct *work)
        ieee->state = IEEE80211_LINKED;
 
        ieee->set_chan(ieee, ieee->current_network.channel);
-       ieee->link_change(ieee->dev);
+       ieee->link_change(ieee);
 
        notify_wx_assoc_event(ieee);
 
@@ -2546,7 +2546,7 @@ void ieee80211_disassociate(struct ieee80211_device *ieee)
                Dot11d_Reset(ieee);
 #endif
        ieee->is_set_key = false;
-       ieee->link_change(ieee->dev);
+       ieee->link_change(ieee);
        if (ieee->state == IEEE80211_LINKED ||
            ieee->state == IEEE80211_ASSOCIATING) {
                ieee->state = IEEE80211_NOLINK;
index f82bb7d6203d37621501a366ffff025b14cd76be..fcafe1925a72d1b2c799f0339cfcfec961cb89f5 100644 (file)
@@ -321,7 +321,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
        ieee80211_stop_send_beacons(ieee);
 
        ieee->state = IEEE80211_LINKED_SCANNING;
-       ieee->link_change(ieee->dev);
+       ieee->link_change(ieee);
        ieee->InitialGainHandler(ieee->dev,IG_Backup);
        if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT && ieee->pHTInfo->bCurBW40MHz) {
                b40M = 1;
@@ -346,7 +346,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
 
        ieee->InitialGainHandler(ieee->dev,IG_Restore);
        ieee->state = IEEE80211_LINKED;
-       ieee->link_change(ieee->dev);
+       ieee->link_change(ieee);
 
 #ifdef ENABLE_LPS
        /* Notify AP that I wake up again */
index efd7e7f0a4f09e68921bf18a68d6ee1143fabaa7..661c904ea8f79ab78f1ea02ffbd56f902d3f7437 100644 (file)
@@ -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)
        {
@@ -3322,7 +3321,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
                                RemovePeerTS(priv->ieee80211,priv->ieee80211->current_network.bssid);
                                ieee->is_roaming = true;
                                ieee->is_set_key = false;
-                               ieee->link_change(dev);
+                               ieee->link_change(ieee);
                                queue_work(ieee->wq, &ieee->associate_procedure_wq);
                        }
                }