summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjay Singh <ajay.kathat@microchip.com>2018-05-02 12:43:45 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-03 13:56:36 -0700
commit130608a86e2eaaa53d0d604136d3ac35b5ee5fc0 (patch)
treeefe0986a81ebc2e6da93d57476fe5b49a312df37
parent25a757b78199fe5ed32eba4a24a289e912dc90ef (diff)
downloadlinux-130608a86e2eaaa53d0d604136d3ac35b5ee5fc0.tar.bz2
staging: wilc1000: use is_broadcast_ether_addr check for broadcast address
Make use of is_broadcast_ether_addr() to check if mac address is broadcast address. Remove static 'broadcast', as its not needed after use of is_broadcast_ether_addr(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/wilc1000/linux_mon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index a6591100ee41..2f4b3f5bb857 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -17,7 +17,6 @@ static struct net_device *wilc_wfi_mon; /* global monitor netdev */
static u8 srcadd[6];
static u8 bssid[6];
-static u8 broadcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */
#define IEEE80211_RADIOTAP_F_TX_FAIL 0x0001 /* failed due to excessive*/
@@ -164,7 +163,7 @@ static netdev_tx_t wilc_wfi_mon_xmit(struct sk_buff *skb,
skb_pull(skb, rtap_len);
- if (skb->data[0] == 0xc0 && (!(memcmp(broadcast, &skb->data[4], 6)))) {
+ if (skb->data[0] == 0xc0 && is_broadcast_ether_addr(&skb->data[4])) {
skb2 = dev_alloc_skb(skb->len + sizeof(struct wilc_wfi_radiotap_cb_hdr));
if (!skb2)
return -ENOMEM;