Skip to content

Commit

Permalink
staging: rtl8192e: Pass ieee80211_device to callbacks
Browse files Browse the repository at this point in the history
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Mike McCormack authored and Greg Kroah-Hartman committed Mar 14, 2011
1 parent 7c186cf commit ad44d2a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
8 changes: 4 additions & 4 deletions drivers/staging/rtl8192e/ieee80211/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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);

}

Expand All @@ -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);

}

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 */
Expand Down
7 changes: 3 additions & 4 deletions drivers/staging/rtl8192e/r8192E_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit ad44d2a

Please sign in to comment.