summaryrefslogtreecommitdiff
path: root/drivers/staging/ozwpan
AgeCommit message (Collapse)Author
2013-04-22staging/ozwpan: info leak in oz_cdev_ioctl()Dan Carpenter
If we're not maxed out then oz_get_pd_list() leaves part of the "list" struct uninitialized. We should clear this so that no stack information is leaked to userspace. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/ozwpan: Mark read only parameters and structs as constPeter Huewe
This patch marks function parameters that are used read only as well as readonly structs (and corresponding pointers) as const. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/ozwpan: Remove empty and unused function oz_cdev_heartbeatPeter Huewe
oz_cdev_heartbeat is empty and unused -> safe to remove. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/ozwpan: Mark local functions as static (fix sparse warnings)Peter Huewe
sparse complains about the following functions ozhcd.c:330:20: warning: symbol 'oz_uncancel_urb' was not declared. Should it be static? ozhcd.c:420:6: warning: symbol 'oz_complete_buffered_urb' was not declared. Should it be static? ozmain.c:25:6: warning: symbol 'g_net_dev' was not declared. Should it be static? ozevent.c:95:5: warning: symbol 'oz_events_open' was not declared. Should it be static? ozevent.c:110:5: warning: symbol 'oz_events_release' was not declared. Should it be static? ozevent.c:121:9: warning: symbol 'oz_events_read' was not declared. Should it be static? ozevent.c:160:30: warning: symbol 'oz_events_fops' was not declared. Should it be static? ozcdev.c:47:14: warning: symbol 'g_oz_class' was not declared. Should it be static? ozcdev.c:74:5: warning: symbol 'oz_cdev_open' was not declared. Should it be static? ozcdev.c:86:5: warning: symbol 'oz_cdev_release' was not declared. Should it be static? ozcdev.c:94:9: warning: symbol 'oz_cdev_read' was not declared. Should it be static? ozcdev.c:146:9: warning: symbol 'oz_cdev_write' was not declared. Should it be static? ozcdev.c:236:6: warning: symbol 'oz_cdev_ioctl' was not declared. Should it be static? ozcdev.c:300:14: warning: symbol 'oz_cdev_poll' was not declared. Should it be static? ozcdev.c:321:30: warning: symbol 'oz_fops' was not declared. Should it be static? ozproto.c:958:6: warning: context imbalance in 'oz_polling_lock_bh' - wrong count at exit ozproto.c:964:6: warning: context imbalance in 'oz_polling_unlock_bh' - unexpected unlock ozusbsvc1.c:308:6: warning: symbol 'oz_usb_handle_ep_data' was not declared. Should it be static? ozpd.c:410:6: warning: symbol 'oz_set_more_bit' was not declared. Should it be static? ozpd.c:418:6: warning: symbol 'oz_set_last_pkt_nb' was not declared. Should it be static? -> add static keyword to silence the warning and make sparse happy. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/ozwpan: Add missing header includesPeter Huewe
ozcdev.c and ozhcd.c should include their own header file, so sparse knows which functions are declared and which not. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/ozwpan: Fix NULL vs zero in ozhcd.c (sparse warning)Peter Huewe
This patch fixes the warning "Using plain integer as NULL pointer", generated by sparse, by replacing the offending 0s with NULL. If the initialization with NULL was unnecessary (due to unconditional assignment before first use) it was removed. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/ozwpan: Fix NULL vs zero in ozusbsvc.c (sparse warning)Peter Huewe
This patch fixes the warning "Using plain integer as NULL pointer", generated by sparse, by replacing the offending 0s with NULL. If the initialization with NULL was unnecessary (due to unconditional assignment before first use) it was removed. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/ozwpan: Fix NULL vs zero in ozcdev.c (sparse warning)Peter Huewe
This patch fixes the warning "Using plain integer as NULL pointer", generated by sparse, by replacing the offending 0s with NULL. If the initialization with NULL was unnecessary (due to unconditional assignment before first use) it was removed. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/ozwpan: Fix NULL vs zero in ozproto.c (sparse warning)Peter Huewe
This patch fixes the warning "Using plain integer as NULL pointer", generated by sparse, by replacing the offending 0s with NULL. If the initialization with NULL was unnecessary (due to unconditional assignment before first use) it was removed. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/ozwpan: Fix NULL vs zero in ozeltbuf.c (sparse warning)Peter Huewe
This patch fixes the warning "Using plain integer as NULL pointer", generated by sparse, by replacing the offending 0s with NULL. If the initialization with NULL was unnecessary (due to unconditional assignment before first use) it was removed. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/ozwpan: Fix NULL vs zero in ozusbsvc1.c (sparse warning)Peter Huewe
This patch fixes the warning "Using plain integer as NULL pointer", generated by sparse, by replacing the offending 0s with NULL. If the initialization with NULL was unnecessary (due to unconditional assignment before first use) it was removed. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/ozwpan: Fix NULL vs zero in ozpd.c (sparse warning)Peter Huewe
This patch fixes the warning "Using plain integer as NULL pointer", generated by sparse, by replacing the offending 0s with NULL. If the initialization with NULL was unnecessary (due to unconditional assignment before first use) it was removed. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29staging:ozwpan: Fix following warning.Rupesh Gujare
The patch ae926051d7eb: "staging: ozwpan: Added USB HCD implementation" from Feb 20, 2012, leads to the following warning: drivers/staging/ozwpan/ozhcd.c:1094 oz_hcd_heartbeat() warn: what is this condition about? 'ep->buffered_units * 50' Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25staging:ozwpan: Change email address.Rupesh Gujare
As part of transition caused due to acquisition of Ozmo Devices by Atmel, my email address is changed. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25staging:ozwpan: Removed myself (Chris Kelly) as maintainer.Chris Kelly
Removed myself (ckelly@ozmodevices.com) as maintainer of ozwpan. Removed my email address from the TODO file. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: ozwpan: Remove redundant null check before kfree in ozhcd.cSachin Kamat
kfree on NULL pointer is a no-op. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: ozwpan: Remove redundant null check before kfree in ozproto.cSachin Kamat
kfree on NULL pointer is a no-op. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: ozwpan: Remove redundant null check before kfree in ozpd.cSachin Kamat
kfree on NULL pointer is a no-op. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: ozwpan: Include oz_events_clear() conditionallySachin Kamat
oz_events_clear() is referenced only when CONFIG_DEBUG_FS is defined. Move the definition too under this flag. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-31staging: ozwpan: use tasklet_kill in device remove/release processXiaotian Feng
Some driver uses tasklet_disable in device remove/release process, tasklet_disable will inc tasklet->count and return. If the tasklet is not handled yet under some softirq pressure, the tasklet will be placed on the tasklet_vec, never have a chance to be excuted. This might lead to a heavy loaded ksoftirqd, wakeup with pending_softirq, but tasklet is disabled. tasklet_kill should be used in this case. Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com> Cc: Rupesh Gujare <rgujare@ozmodevices.com> Cc: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19staging: ozwpan: compare pointer to NULL rather than 0Fengguang Wu
Generated by: scripts/coccinelle/null/badzero.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-16Merge 3.6-rc6 into staging-nextGreg Kroah-Hartman
This pulls in the staging tree fixes in 3.6-rc6 into our branch to resolve the merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05staging: ozwpan: use list_move_tail instead of list_del/list_add_tailWei Yongjun
Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: ozwpan: remove pointless conditional before kfree_skb()Wei Yongjun
Remove pointless conditional before kfree_skb(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: ozwpan: Fix typo in staging/ozwpanMasanari Iida
Fix spelling typo in staging/ozwpan Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: ozwpan: fix memcmp() test in oz_set_active_pd()Tomas Winkler
"addr" is a pointer so it's either 4 or 8 bytes, but actually we want to compare 6 bytes (ETH_ALEN). As network stack already provides helper function is_zero_ether_addr() we use that instead of memcmp Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13staging: ozwpan: Bump version numberRupesh Gujare
Bump version numbers to keep in sync with internal version information. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13staging: ozwpan: isoc latency for audio burstRupesh Gujare
Set audio latency. This fixes issue where audio clips heard during link outage. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13staging: ozwpan: Return correct actual_length to userlandRupesh Gujare
This fixes issue where wrong retrun value was received by userland application after writing data to raw hid device. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13staging: ozwpan: Insulate driver from HZ valueRupesh Gujare
This patch fixes issue caused due to different HZ value on system which do not have HZ=1000 Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13staging: ozwpan: buffer frame if urb not available.Rupesh Gujare
For interrupt end point buffer frames, if urb is not available & give back as soon as urb is received from usb core. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-26staging: ozwpan: Update TODO fileRupesh Gujare
Update TODO file. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-26staging: ozwpan: Unregister with sysfs while unloading.Rupesh Gujare
Destroy device node & unregister device class from sysfs while unloading driver Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20staging: ozwpan: Set AC_VO priorityRupesh Gujare
Set packet priority to AC_VO for audio data. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20staging: ozwpan: udev supportRupesh Gujare
Register ozmo_wpan class with sysfs & support for udev to create device node. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20staging: ozwpan: set last_pkt_nbRupesh Gujare
In case of trigeered ISOC mode set last_pkt_nb only when we are ready to send data. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20staging: ozwpan: kmalloc flagRupesh Gujare
Pass right flag as memory is assigned in process context. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20staging: ozwpan: Correct ioctl numbers.Rupesh Gujare
ioctl numbers were not in order, rearranging them in ascending order. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20staging: ozwpan: ISOC transfer in triggered modeRupesh Gujare
This patch implements ISOC frame transfer while PD is in triggered mode. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-02Merge 3.4-rc5 into staging-nextGreg Kroah-Hartman
This resolves the conflict in: drivers/staging/vt6656/ioctl.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-26staging: ozwpan: Fix bug where kfree is called twice.Rupesh Gujare
Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25staging: ozwpan: Fix bug where kfree is called twice.Rupesh Gujare
Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25staging,ozwpan: Fix typo in comments within staging/ozwpanMasanari Iida
Correct spelling in comments withon staging/ozwpan Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: ozwpan: Replace existing event logging mechanismRupesh Gujare
This patch replaces existing event logging mechanism from ioctl to debugfs. This patch replaces previous patch submitted by Chris Kelly. Previous patch can be found at :- http://article.gmane.org/gmane.linux.usb.general/60026/ Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging:ozwpan:ozhcd.c Fix typos in staging:ozwpanJustin P. Mattock
The below patch fixes a typo that I found while reading. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Acked-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: ozwpan: Added new maintainer for ozwpanChris Kelly
Added Rupesh Gujare to MAINTAINERS file and contact in TODO file for ozwpan driver. Signed-off-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-14staging: ozwpan depends on NETRandy Dunlap
Fix build errors: add depends on NET. ERROR: "skb_clone" [drivers/staging/ozwpan/ozwpan.ko] undefined! ERROR: "dev_get_by_name" [drivers/staging/ozwpan/ozwpan.ko] undefined! ERROR: "dev_remove_pack" [drivers/staging/ozwpan/ozwpan.ko] undefined! ERROR: "init_net" [drivers/staging/ozwpan/ozwpan.ko] undefined! ERROR: "__alloc_skb" [drivers/staging/ozwpan/ozwpan.ko] undefined! ERROR: "kfree_skb" [drivers/staging/ozwpan/ozwpan.ko] undefined! ERROR: "dev_add_pack" [drivers/staging/ozwpan/ozwpan.ko] undefined! ERROR: "consume_skb" [drivers/staging/ozwpan/ozwpan.ko] undefined! ERROR: "dev_queue_xmit" [drivers/staging/ozwpan/ozwpan.ko] undefined! ERROR: "skb_put" [drivers/staging/ozwpan/ozwpan.ko] undefined! Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02staging: ozwpan: remove debug allocatorGreg Kroah-Hartman
The kernel already has a debug allocator, no need to have one unique to a single driver. So delete it, replace with kfree, kmalloc, and, in a few places that need it, kzalloc(). Cc: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02Staging: ozwpan: prevent bogus dereferenceDan Carpenter
app_id comes from the network and can't be trusted. If it's zero then it will lead to a kernel crash. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02staging: ozwpan: added TODO file.Chris Kelly
Added TODO file for ozwpan driver. Signed-off-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>