diff options
Diffstat (limited to 'drivers/staging/ozwpan')
-rw-r--r-- | drivers/staging/ozwpan/ozcdev.c | 2 | ||||
-rw-r--r-- | drivers/staging/ozwpan/ozeltbuf.c | 3 | ||||
-rw-r--r-- | drivers/staging/ozwpan/ozhcd.c | 2 | ||||
-rw-r--r-- | drivers/staging/ozwpan/ozpd.c | 1 | ||||
-rw-r--r-- | drivers/staging/ozwpan/ozproto.c | 11 | ||||
-rw-r--r-- | drivers/staging/ozwpan/ozusbsvc.c | 1 | ||||
-rw-r--r-- | drivers/staging/ozwpan/ozusbsvc1.c | 1 |
7 files changed, 10 insertions, 11 deletions
diff --git a/drivers/staging/ozwpan/ozcdev.c b/drivers/staging/ozwpan/ozcdev.c index 6ce0af9977d8..5de5981b3bba 100644 --- a/drivers/staging/ozwpan/ozcdev.c +++ b/drivers/staging/ozwpan/ozcdev.c @@ -448,7 +448,7 @@ int oz_cdev_start(struct oz_pd *pd, int resume) } spin_lock(&g_cdev.lock); if ((g_cdev.active_pd == NULL) && - (memcmp(pd->mac_addr, g_cdev.active_addr, ETH_ALEN) == 0)) { + ether_addr_equal(pd->mac_addr, g_cdev.active_addr)) { oz_pd_get(pd); g_cdev.active_pd = pd; oz_dbg(ON, "Active PD arrived\n"); diff --git a/drivers/staging/ozwpan/ozeltbuf.c b/drivers/staging/ozwpan/ozeltbuf.c index 9b86486c6b11..bd560c67fc8c 100644 --- a/drivers/staging/ozwpan/ozeltbuf.c +++ b/drivers/staging/ozwpan/ozeltbuf.c @@ -3,7 +3,6 @@ * Released under the GNU General Public License Version 2 (GPLv2). * ----------------------------------------------------------------------------- */ -#include <linux/init.h> #include <linux/module.h> #include <linux/netdevice.h> #include "ozdbg.h" @@ -138,7 +137,7 @@ int oz_elt_stream_create(struct oz_elt_buf *buf, u8 id, int max_buf_count) oz_dbg(ON, "%s: (0x%x)\n", __func__, id); - st = kzalloc(sizeof(struct oz_elt_stream), GFP_ATOMIC | __GFP_ZERO); + st = kzalloc(sizeof(struct oz_elt_stream), GFP_ATOMIC); if (st == NULL) return -ENOMEM; atomic_set(&st->ref_count, 1); diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c index d9c43c3282e7..efaf26f734c3 100644 --- a/drivers/staging/ozwpan/ozhcd.c +++ b/drivers/staging/ozwpan/ozhcd.c @@ -2270,6 +2270,8 @@ static int oz_plat_probe(struct platform_device *dev) usb_put_hcd(hcd); return -1; } + device_wakeup_enable(hcd->self.controller); + spin_lock_bh(&g_hcdlock); g_ozhcd = ozhcd; spin_unlock_bh(&g_hcdlock); diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c index ab85a724a0e2..743695077346 100644 --- a/drivers/staging/ozwpan/ozpd.c +++ b/drivers/staging/ozwpan/ozpd.c @@ -4,7 +4,6 @@ * ----------------------------------------------------------------------------- */ -#include <linux/init.h> #include <linux/module.h> #include <linux/timer.h> #include <linux/sched.h> diff --git a/drivers/staging/ozwpan/ozproto.c b/drivers/staging/ozwpan/ozproto.c index 88714ec85705..5d965cf06d59 100644 --- a/drivers/staging/ozwpan/ozproto.c +++ b/drivers/staging/ozwpan/ozproto.c @@ -4,11 +4,11 @@ * ----------------------------------------------------------------------------- */ -#include <linux/init.h> #include <linux/module.h> #include <linux/timer.h> #include <linux/sched.h> #include <linux/netdevice.h> +#include <linux/etherdevice.h> #include <linux/errno.h> #include <linux/ieee80211.h> #include "ozdbg.h" @@ -180,7 +180,7 @@ static struct oz_pd *oz_connect_req(struct oz_pd *cur_pd, struct oz_elt *elt, spin_lock_bh(&g_polling_lock); list_for_each(e, &g_pd_list) { pd2 = container_of(e, struct oz_pd, link); - if (memcmp(pd2->mac_addr, pd_addr, ETH_ALEN) == 0) { + if (ether_addr_equal(pd2->mac_addr, pd_addr)) { free_pd = pd; pd = pd2; break; @@ -337,7 +337,7 @@ static void oz_rx_frame(struct sk_buff *skb) oz_dbg(RX_FRAMES, "RX frame PN=0x%x LPN=0x%x control=0x%x\n", oz_hdr->pkt_num, oz_hdr->last_pkt_num, oz_hdr->control); mac_hdr = skb_mac_header(skb); - src_addr = &mac_hdr[ETH_ALEN] ; + src_addr = &mac_hdr[ETH_ALEN]; length = skb->len; /* Check the version field */ @@ -597,7 +597,7 @@ struct oz_pd *oz_pd_find(const u8 *mac_addr) spin_lock_bh(&g_polling_lock); list_for_each(e, &g_pd_list) { pd = container_of(e, struct oz_pd, link); - if (memcmp(pd->mac_addr, mac_addr, ETH_ALEN) == 0) { + if (ether_addr_equal(pd->mac_addr, mac_addr)) { atomic_inc(&pd->ref_count); spin_unlock_bh(&g_polling_lock); return pd; @@ -668,8 +668,8 @@ void oz_binding_add(const char *net_dev) if (binding) { binding->ptype.type = __constant_htons(OZ_ETHERTYPE); binding->ptype.func = oz_pkt_recv; - memcpy(binding->name, net_dev, OZ_MAX_BINDING_LEN); if (net_dev && *net_dev) { + memcpy(binding->name, net_dev, OZ_MAX_BINDING_LEN); oz_dbg(ON, "Adding binding: %s\n", net_dev); binding->ptype.dev = dev_get_by_name(&init_net, net_dev); @@ -680,6 +680,7 @@ void oz_binding_add(const char *net_dev) } } else { oz_dbg(ON, "Binding to all netcards\n"); + memset(binding->name, 0, OZ_MAX_BINDING_LEN); binding->ptype.dev = NULL; } if (binding) { diff --git a/drivers/staging/ozwpan/ozusbsvc.c b/drivers/staging/ozwpan/ozusbsvc.c index cf263791cb30..edd44c457a4b 100644 --- a/drivers/staging/ozwpan/ozusbsvc.c +++ b/drivers/staging/ozwpan/ozusbsvc.c @@ -11,7 +11,6 @@ * ----------------------------------------------------------------------------- */ -#include <linux/init.h> #include <linux/module.h> #include <linux/timer.h> #include <linux/sched.h> diff --git a/drivers/staging/ozwpan/ozusbsvc1.c b/drivers/staging/ozwpan/ozusbsvc1.c index 228bffaa69c9..617f51cdaea7 100644 --- a/drivers/staging/ozwpan/ozusbsvc1.c +++ b/drivers/staging/ozwpan/ozusbsvc1.c @@ -5,7 +5,6 @@ * This file implements the protocol specific parts of the USB service for a PD. * ----------------------------------------------------------------------------- */ -#include <linux/init.h> #include <linux/module.h> #include <linux/timer.h> #include <linux/sched.h> |