summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2008-10-30 18:12:04 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 13:51:50 -0800
commitc930e0c008a1b81429e5dec089970b50f97ef593 (patch)
treea4cf34aaf1038e0700ea40b9af5be33a980f6062 /drivers
parent82f8c2cd469211e6ae7e0a3c51eb93ab78f2427c (diff)
Staging: w35und: move global wbsoft_enabled to struct wbsoft_priv
This is a preparational step for moving packet_came() to wb35rx.c(). Acked-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/winbond/core.h2
-rw-r--r--drivers/staging/winbond/wbusb.c11
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h
index 64b73bbf7474..c6dd223e722f 100644
--- a/drivers/staging/winbond/core.h
+++ b/drivers/staging/winbond/core.h
@@ -39,6 +39,8 @@ struct wbsoft_priv {
struct iw_statistics iw_stats;
u8 LinkName[WB_MAX_LINK_NAME_LEN];
+
+ bool enabled;
};
#endif /* __WINBOND_CORE_H */
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index 0f70101603cc..246f20b3b793 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -46,8 +46,6 @@ static struct ieee80211_supported_band wbsoft_band_2GHz = {
.n_bitrates = ARRAY_SIZE(wbsoft_rates),
};
-int wbsoft_enabled;
-
static int wbsoft_add_interface(struct ieee80211_hw *dev,
struct ieee80211_if_init_conf *conf)
{
@@ -129,8 +127,10 @@ static int wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
static int wbsoft_start(struct ieee80211_hw *dev)
{
- wbsoft_enabled = 1;
- printk("wbsoft_start called\n");
+ struct wbsoft_priv *priv = dev->priv;
+
+ priv->enabled = true;
+
return 0;
}
@@ -393,10 +393,11 @@ error:
void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress, int PacketSize)
{
+ struct wbsoft_priv *priv = hw->priv;
struct sk_buff *skb;
struct ieee80211_rx_status rx_status = {0};
- if (!wbsoft_enabled)
+ if (!priv->enabled)
return;
skb = dev_alloc_skb(PacketSize);