diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-09-21 05:52:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-10-09 16:47:23 -0400 |
commit | 4074e77ca3c0c5047acb012a440022ca1f3a2dab (patch) | |
tree | fdf613a651619525dfce1f22d7559ede6ed9b48e /drivers/staging | |
parent | 999b9da40ea4c9efb31689c08d1d1b7a621ecce0 (diff) |
Staging: w35und: Fix ->beacon_int breakage
Commit f424afa17899408cbd267a4c4534ca6fc9d8f71c ("mac80211: remove
deprecated API") removed ->beacon_int from struct ieee80211_conf. Fix
breakage in w35und by setting beacon period in ->add_interface to
bss_conf.beacon_int.
Cc: Jiri Benc <jbenc@suse.cz>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sandro Bonazzola <sandro.bonazzola@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/winbond/wbusb.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c index 8950724f168e..ee6425e43571 100644 --- a/drivers/staging/winbond/wbusb.c +++ b/drivers/staging/winbond/wbusb.c | |||
@@ -51,10 +51,26 @@ static struct ieee80211_supported_band wbsoft_band_2GHz = { | |||
51 | .n_bitrates = ARRAY_SIZE(wbsoft_rates), | 51 | .n_bitrates = ARRAY_SIZE(wbsoft_rates), |
52 | }; | 52 | }; |
53 | 53 | ||
54 | static void hal_set_beacon_period(struct hw_data *pHwData, u16 beacon_period) | ||
55 | { | ||
56 | u32 tmp; | ||
57 | |||
58 | if (pHwData->SurpriseRemove) | ||
59 | return; | ||
60 | |||
61 | pHwData->BeaconPeriod = beacon_period; | ||
62 | tmp = pHwData->BeaconPeriod << 16; | ||
63 | tmp |= pHwData->ProbeDelay; | ||
64 | Wb35Reg_Write(pHwData, 0x0848, tmp); | ||
65 | } | ||
66 | |||
54 | static int wbsoft_add_interface(struct ieee80211_hw *dev, | 67 | static int wbsoft_add_interface(struct ieee80211_hw *dev, |
55 | struct ieee80211_if_init_conf *conf) | 68 | struct ieee80211_if_init_conf *conf) |
56 | { | 69 | { |
57 | printk("wbsoft_add interface called\n"); | 70 | struct wbsoft_priv *priv = dev->priv; |
71 | |||
72 | hal_set_beacon_period(&priv->sHwData, conf->vif->bss_conf.beacon_int); | ||
73 | |||
58 | return 0; | 74 | return 0; |
59 | } | 75 | } |
60 | 76 | ||
@@ -138,19 +154,6 @@ static void hal_set_radio_mode(struct hw_data *pHwData, unsigned char radio_off) | |||
138 | Wb35Reg_Write(pHwData, 0x0824, reg->M24_MacControl); | 154 | Wb35Reg_Write(pHwData, 0x0824, reg->M24_MacControl); |
139 | } | 155 | } |
140 | 156 | ||
141 | static void hal_set_beacon_period(struct hw_data *pHwData, u16 beacon_period) | ||
142 | { | ||
143 | u32 tmp; | ||
144 | |||
145 | if (pHwData->SurpriseRemove) | ||
146 | return; | ||
147 | |||
148 | pHwData->BeaconPeriod = beacon_period; | ||
149 | tmp = pHwData->BeaconPeriod << 16; | ||
150 | tmp |= pHwData->ProbeDelay; | ||
151 | Wb35Reg_Write(pHwData, 0x0848, tmp); | ||
152 | } | ||
153 | |||
154 | static void | 157 | static void |
155 | hal_set_current_channel_ex(struct hw_data *pHwData, ChanInfo channel) | 158 | hal_set_current_channel_ex(struct hw_data *pHwData, ChanInfo channel) |
156 | { | 159 | { |
@@ -244,7 +247,6 @@ static void hal_set_accept_beacon(struct hw_data *pHwData, u8 enable) | |||
244 | static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) | 247 | static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) |
245 | { | 248 | { |
246 | struct wbsoft_priv *priv = dev->priv; | 249 | struct wbsoft_priv *priv = dev->priv; |
247 | struct ieee80211_conf *conf = &dev->conf; | ||
248 | ChanInfo ch; | 250 | ChanInfo ch; |
249 | 251 | ||
250 | printk("wbsoft_config called\n"); | 252 | printk("wbsoft_config called\n"); |
@@ -254,7 +256,6 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) | |||
254 | ch.ChanNo = 1; | 256 | ch.ChanNo = 1; |
255 | 257 | ||
256 | hal_set_current_channel(&priv->sHwData, ch); | 258 | hal_set_current_channel(&priv->sHwData, ch); |
257 | hal_set_beacon_period(&priv->sHwData, conf->beacon_int); | ||
258 | hal_set_accept_broadcast(&priv->sHwData, 1); | 259 | hal_set_accept_broadcast(&priv->sHwData, 1); |
259 | hal_set_accept_promiscuous(&priv->sHwData, 1); | 260 | hal_set_accept_promiscuous(&priv->sHwData, 1); |
260 | hal_set_accept_multicast(&priv->sHwData, 1); | 261 | hal_set_accept_multicast(&priv->sHwData, 1); |