Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167274
b: refs/heads/master
c: 4074e77
h: refs/heads/master
v: v3
  • Loading branch information
Pekka Enberg authored and Greg Kroah-Hartman committed Oct 9, 2009
1 parent c43a08c commit 62c96f4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 999b9da40ea4c9efb31689c08d1d1b7a621ecce0
refs/heads/master: 4074e77ca3c0c5047acb012a440022ca1f3a2dab
33 changes: 17 additions & 16 deletions trunk/drivers/staging/winbond/wbusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,26 @@ static struct ieee80211_supported_band wbsoft_band_2GHz = {
.n_bitrates = ARRAY_SIZE(wbsoft_rates),
};

static void hal_set_beacon_period(struct hw_data *pHwData, u16 beacon_period)
{
u32 tmp;

if (pHwData->SurpriseRemove)
return;

pHwData->BeaconPeriod = beacon_period;
tmp = pHwData->BeaconPeriod << 16;
tmp |= pHwData->ProbeDelay;
Wb35Reg_Write(pHwData, 0x0848, tmp);
}

static int wbsoft_add_interface(struct ieee80211_hw *dev,
struct ieee80211_if_init_conf *conf)
{
printk("wbsoft_add interface called\n");
struct wbsoft_priv *priv = dev->priv;

hal_set_beacon_period(&priv->sHwData, conf->vif->bss_conf.beacon_int);

return 0;
}

Expand Down Expand Up @@ -138,19 +154,6 @@ static void hal_set_radio_mode(struct hw_data *pHwData, unsigned char radio_off)
Wb35Reg_Write(pHwData, 0x0824, reg->M24_MacControl);
}

static void hal_set_beacon_period(struct hw_data *pHwData, u16 beacon_period)
{
u32 tmp;

if (pHwData->SurpriseRemove)
return;

pHwData->BeaconPeriod = beacon_period;
tmp = pHwData->BeaconPeriod << 16;
tmp |= pHwData->ProbeDelay;
Wb35Reg_Write(pHwData, 0x0848, tmp);
}

static void
hal_set_current_channel_ex(struct hw_data *pHwData, ChanInfo channel)
{
Expand Down Expand Up @@ -244,7 +247,6 @@ static void hal_set_accept_beacon(struct hw_data *pHwData, u8 enable)
static int wbsoft_config(struct ieee80211_hw *dev, u32 changed)
{
struct wbsoft_priv *priv = dev->priv;
struct ieee80211_conf *conf = &dev->conf;
ChanInfo ch;

printk("wbsoft_config called\n");
Expand All @@ -254,7 +256,6 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed)
ch.ChanNo = 1;

hal_set_current_channel(&priv->sHwData, ch);
hal_set_beacon_period(&priv->sHwData, conf->beacon_int);
hal_set_accept_broadcast(&priv->sHwData, 1);
hal_set_accept_promiscuous(&priv->sHwData, 1);
hal_set_accept_multicast(&priv->sHwData, 1);
Expand Down

0 comments on commit 62c96f4

Please sign in to comment.