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

Staging: w35und: move global wbsoft_enabled to struct wbsoft_priv

This is a preparational step for moving packet_came() to wb35rx.c().
Acked-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 82f8c2cd
...@@ -39,6 +39,8 @@ struct wbsoft_priv { ...@@ -39,6 +39,8 @@ struct wbsoft_priv {
struct iw_statistics iw_stats; struct iw_statistics iw_stats;
u8 LinkName[WB_MAX_LINK_NAME_LEN]; u8 LinkName[WB_MAX_LINK_NAME_LEN];
bool enabled;
}; };
#endif /* __WINBOND_CORE_H */ #endif /* __WINBOND_CORE_H */
...@@ -46,8 +46,6 @@ static struct ieee80211_supported_band wbsoft_band_2GHz = { ...@@ -46,8 +46,6 @@ static struct ieee80211_supported_band wbsoft_band_2GHz = {
.n_bitrates = ARRAY_SIZE(wbsoft_rates), .n_bitrates = ARRAY_SIZE(wbsoft_rates),
}; };
int wbsoft_enabled;
static int wbsoft_add_interface(struct ieee80211_hw *dev, static int wbsoft_add_interface(struct ieee80211_hw *dev,
struct ieee80211_if_init_conf *conf) struct ieee80211_if_init_conf *conf)
{ {
...@@ -129,8 +127,10 @@ static int wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb) ...@@ -129,8 +127,10 @@ static int wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
static int wbsoft_start(struct ieee80211_hw *dev) static int wbsoft_start(struct ieee80211_hw *dev)
{ {
wbsoft_enabled = 1; struct wbsoft_priv *priv = dev->priv;
printk("wbsoft_start called\n");
priv->enabled = true;
return 0; return 0;
} }
...@@ -393,10 +393,11 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id ...@@ -393,10 +393,11 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress, int PacketSize) void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress, int PacketSize)
{ {
struct wbsoft_priv *priv = hw->priv;
struct sk_buff *skb; struct sk_buff *skb;
struct ieee80211_rx_status rx_status = {0}; struct ieee80211_rx_status rx_status = {0};
if (!wbsoft_enabled) if (!priv->enabled)
return; return;
skb = dev_alloc_skb(PacketSize); skb = dev_alloc_skb(PacketSize);
......
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