Commit a36e0894 authored by Pekka Enberg's avatar Pekka Enberg Committed by Greg Kroah-Hartman

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: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Acked-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 16d3659f
...@@ -32,6 +32,13 @@ static struct ieee80211_channel wbsoft_channels[] = { ...@@ -32,6 +32,13 @@ static struct ieee80211_channel wbsoft_channels[] = {
{ .center_freq = 2412}, { .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; int wbsoft_enabled;
struct ieee80211_hw *my_dev; struct ieee80211_hw *my_dev;
struct wb35_adapter * my_adapter; struct wb35_adapter * my_adapter;
...@@ -192,7 +199,6 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id ...@@ -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 usb_device *udev = interface_to_usbdev(intf);
struct wbsoft_priv *priv; struct wbsoft_priv *priv;
struct ieee80211_hw *dev; struct ieee80211_hw *dev;
static struct ieee80211_supported_band band;
int err; int err;
usb_get_dev(udev); usb_get_dev(udev);
...@@ -253,12 +259,8 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id ...@@ -253,12 +259,8 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
dev->channel_change_time = 1000; dev->channel_change_time = 1000;
dev->queues = 1; dev->queues = 1;
band.channels = wbsoft_channels; dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &wbsoft_band_2GHz;
band.n_channels = ARRAY_SIZE(wbsoft_channels);
band.bitrates = wbsoft_rates;
band.n_bitrates = ARRAY_SIZE(wbsoft_rates);
dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &band;
err = ieee80211_register_hw(dev); err = ieee80211_register_hw(dev);
if (err) if (err)
goto error_free_hw; goto error_free_hw;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment