Commit 87070914 authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: avoid use of static variable in linux_mon.c

Define local variable for 'srcadd' & 'bssid' static variables and use
ether_addr_copy() to copy value into them.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 98f83d3d
...@@ -18,9 +18,6 @@ struct wilc_wfi_radiotap_cb_hdr { ...@@ -18,9 +18,6 @@ struct wilc_wfi_radiotap_cb_hdr {
u16 tx_flags; u16 tx_flags;
} __packed; } __packed;
static u8 srcadd[6];
static u8 bssid[6];
#define TX_RADIOTAP_PRESENT ((1 << IEEE80211_RADIOTAP_RATE) | \ #define TX_RADIOTAP_PRESENT ((1 << IEEE80211_RADIOTAP_RATE) | \
(1 << IEEE80211_RADIOTAP_TX_FLAGS)) (1 << IEEE80211_RADIOTAP_TX_FLAGS))
...@@ -150,6 +147,8 @@ static netdev_tx_t wilc_wfi_mon_xmit(struct sk_buff *skb, ...@@ -150,6 +147,8 @@ static netdev_tx_t wilc_wfi_mon_xmit(struct sk_buff *skb,
struct wilc_wfi_mon_priv *mon_priv; struct wilc_wfi_mon_priv *mon_priv;
struct sk_buff *skb2; struct sk_buff *skb2;
struct wilc_wfi_radiotap_cb_hdr *cb_hdr; struct wilc_wfi_radiotap_cb_hdr *cb_hdr;
u8 srcadd[ETH_ALEN];
u8 bssid[ETH_ALEN];
mon_priv = netdev_priv(dev); mon_priv = netdev_priv(dev);
if (!mon_priv) if (!mon_priv)
...@@ -193,8 +192,8 @@ static netdev_tx_t wilc_wfi_mon_xmit(struct sk_buff *skb, ...@@ -193,8 +192,8 @@ static netdev_tx_t wilc_wfi_mon_xmit(struct sk_buff *skb,
} }
skb->dev = mon_priv->real_ndev; skb->dev = mon_priv->real_ndev;
memcpy(srcadd, &skb->data[10], 6); ether_addr_copy(srcadd, &skb->data[10]);
memcpy(bssid, &skb->data[16], 6); ether_addr_copy(bssid, &skb->data[16]);
/* /*
* Identify if data or mgmt packet, if source address and bssid * Identify if data or mgmt packet, if source address and bssid
* fields are equal send it to mgmt frames handler * fields are equal send it to mgmt frames handler
......
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