summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wlan-ng
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2016-10-10 16:02:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-16 10:26:23 +0200
commitec30aebb0db01375e0594f1b6c2bb9335801a913 (patch)
tree2c8842c964f848ebeb4151bb7d0afd25de9040c9 /drivers/staging/wlan-ng
parent229dbdc577cf6cf0f0589739b403aa5ef125f8e2 (diff)
downloadblackbird-op-linux-ec30aebb0db01375e0594f1b6c2bb9335801a913.tar.gz
blackbird-op-linux-ec30aebb0db01375e0594f1b6c2bb9335801a913.zip
staging: wlan-ng: Replace data type declaration with variable of same type in p80211netdev.c
sizeof(var) instead of sizeof(struct XXX) is preferred. Fix them in p80211netdev.c Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r--drivers/staging/wlan-ng/p80211netdev.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
index 656033ae3bf0..10dacf86d069 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -342,8 +342,8 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
goto failed;
}
- memset(&p80211_hdr, 0, sizeof(union p80211_hdr));
- memset(&p80211_wep, 0, sizeof(struct p80211_metawep));
+ memset(&p80211_hdr, 0, sizeof(p80211_hdr));
+ memset(&p80211_wep, 0, sizeof(p80211_wep));
if (netif_queue_stopped(netdev)) {
netdev_dbg(netdev, "called when queue stopped.\n");
@@ -381,8 +381,8 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
goto failed;
}
/* move the header over */
- memcpy(&p80211_hdr, skb->data, sizeof(union p80211_hdr));
- skb_pull(skb, sizeof(union p80211_hdr));
+ memcpy(&p80211_hdr, skb->data, sizeof(p80211_hdr));
+ skb_pull(skb, sizeof(p80211_hdr));
} else {
if (skb_ether_to_p80211
(wlandev, wlandev->ethconv, skb, &p80211_hdr,
@@ -640,9 +640,9 @@ static int p80211knetdev_set_mac_address(struct net_device *dev, void *addr)
resultcode = &dot11req.resultcode;
/* Set up a dot11req_mibset */
- memset(&dot11req, 0, sizeof(struct p80211msg_dot11req_mibset));
+ memset(&dot11req, 0, sizeof(dot11req));
dot11req.msgcode = DIDmsg_dot11req_mibset;
- dot11req.msglen = sizeof(struct p80211msg_dot11req_mibset);
+ dot11req.msglen = sizeof(dot11req);
memcpy(dot11req.devname,
((struct wlandevice *)dev->ml_priv)->name, WLAN_DEVNAMELEN_MAX - 1);
OpenPOWER on IntegriCloud