summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2008-10-28 00:20:03 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 13:51:45 -0800
commita36e0894bf5e24b2b0660ac3b2891f6e49b46edd (patch)
tree29c1b65680012da315480f62852e30de98d15f57 /drivers/staging
parent16d3659fcda922a31873e9e827b12c825b36fd11 (diff)
downloadtalos-obmc-linux-a36e0894bf5e24b2b0660ac3b2891f6e49b46edd.tar.gz
talos-obmc-linux-a36e0894bf5e24b2b0660ac3b2891f6e49b46edd.zip
Staging: w35und: move supported band initialization out of wb35_probe()
This patch moves the static struct ieee80211_supported_band initialization out of w35_probe() because it's really global read-only configuration data. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/winbond/linux/wbusb.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/staging/winbond/linux/wbusb.c b/drivers/staging/winbond/linux/wbusb.c
index 75213b53a49f..bd708a2d1484 100644
--- a/drivers/staging/winbond/linux/wbusb.c
+++ b/drivers/staging/winbond/linux/wbusb.c
@@ -32,6 +32,13 @@ static struct ieee80211_channel wbsoft_channels[] = {
{ .center_freq = 2412},
};
+static struct ieee80211_supported_band wbsoft_band_2GHz = {
+ .channels = wbsoft_channels,
+ .n_channels = ARRAY_SIZE(wbsoft_channels),
+ .bitrates = wbsoft_rates,
+ .n_bitrates = ARRAY_SIZE(wbsoft_rates),
+};
+
int wbsoft_enabled;
struct ieee80211_hw *my_dev;
struct wb35_adapter * my_adapter;
@@ -192,7 +199,6 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
struct usb_device *udev = interface_to_usbdev(intf);
struct wbsoft_priv *priv;
struct ieee80211_hw *dev;
- static struct ieee80211_supported_band band;
int err;
usb_get_dev(udev);
@@ -253,12 +259,8 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
dev->channel_change_time = 1000;
dev->queues = 1;
- band.channels = wbsoft_channels;
- band.n_channels = ARRAY_SIZE(wbsoft_channels);
- band.bitrates = wbsoft_rates;
- band.n_bitrates = ARRAY_SIZE(wbsoft_rates);
+ dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &wbsoft_band_2GHz;
- dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &band;
err = ieee80211_register_hw(dev);
if (err)
goto error_free_hw;
OpenPOWER on IntegriCloud