Staging: w35und: move global wbsoft_enabled to struct wbsoft_priv
authorPekka Enberg <penberg@cs.helsinki.fi>
Thu, 30 Oct 2008 16:12:04 +0000 (18:12 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Jan 2009 21:51:50 +0000 (13:51 -0800)
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>
drivers/staging/winbond/core.h
drivers/staging/winbond/wbusb.c

index 64b73bbf747456f9d1dbbf00fc04bb28deec0db7..c6dd223e722fae7604be31ab8ad7732588153328 100644 (file)
@@ -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 */
index 0f70101603ccb9304b004b11de908bd9206b2991..246f20b3b793fec8a1834ced63b08ee7fb96375f 100644 (file)
@@ -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);