diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2019-02-05 07:15:56 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-07 13:31:20 +0100 |
commit | 8707091415997b0fb24054ad73affb5f89360540 (patch) | |
tree | e7900e09e64548236de143488273832b2ead567b /drivers/staging/wilc1000 | |
parent | 98f83d3d01eb68e32e7b0de48aee8b19145a9d1b (diff) |
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: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000')
-rw-r--r-- | drivers/staging/wilc1000/linux_mon.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index ce37b6f2336a..9fe19a3e1dd4 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -18,9 +18,6 @@ struct wilc_wfi_radiotap_cb_hdr { u16 tx_flags; } __packed; -static u8 srcadd[6]; -static u8 bssid[6]; - #define TX_RADIOTAP_PRESENT ((1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_TX_FLAGS)) @@ -150,6 +147,8 @@ static netdev_tx_t wilc_wfi_mon_xmit(struct sk_buff *skb, struct wilc_wfi_mon_priv *mon_priv; struct sk_buff *skb2; struct wilc_wfi_radiotap_cb_hdr *cb_hdr; + u8 srcadd[ETH_ALEN]; + u8 bssid[ETH_ALEN]; mon_priv = netdev_priv(dev); if (!mon_priv) @@ -193,8 +192,8 @@ static netdev_tx_t wilc_wfi_mon_xmit(struct sk_buff *skb, } skb->dev = mon_priv->real_ndev; - memcpy(srcadd, &skb->data[10], 6); - memcpy(bssid, &skb->data[16], 6); + ether_addr_copy(srcadd, &skb->data[10]); + ether_addr_copy(bssid, &skb->data[16]); /* * Identify if data or mgmt packet, if source address and bssid * fields are equal send it to mgmt frames handler |