Kautuk Consul
e8df1674d3
staging: quatech_usb2: Potential lost wakeup scenario in TIOCMIWAIT
...
If the usermode app does an ioctl over this serial device by
using TIOCMIWAIT, then the code will wait by setting the current
task state to TASK_INTERRUPTIBLE and then calling schedule().
This will be woken up by the qt2_process_modem_status on URB
completion when the port_extra->shadowMSR is set to the new
modem status.
However, this could result in a lost wakeup scenario due to a race
in the logic in the qt2_ioctl(TIOCMIWAIT) loop and the URB completion
for new modem status in qt2_process_modem_status.
Due to this, the usermode app's task will continue to sleep despite a
change in the modem status.
Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com >
Cc: stable <stable@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-19 10:46:18 -07:00
Kevin McKinney
e228b7426e
Staging: bcm: Add size maximum size restrictions for IOCTL_IDLE_REQ
...
In the first alteration, the MAX_CNTL_PKT_SIZE is the
maximum size of the control packet in ->Adapter->txctlpacket[]
which is defined in InitAdapter(). This caps the size of
kmalloc memory allocation. In the second change, this max
cap fixes a potential memory corruption bug when subsequent
memset and memcpy calls are invoked.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-19 10:46:17 -07:00
Kevin McKinney
5ac5bd8754
Staging: bcm: Add size minimum size restrictions for IOCTL_IDLE_REQ
...
If IoBuffer.InputLength is zero then this will cause an Oops when
we dereference the ZERO_SIZE_PTR. Or if it's smaller than
sizeof(struct link_request) then we would get memory corruption
when we set ->PLength in CopyBufferToControlPacket().
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-19 10:46:17 -07:00
Alexander Thomas
7518b9b8fc
staging: usbip: fix up api changes that broke windows clients
...
Revert changes in definitions that were submitted on May 11 2011 and
committed on June 7 2011. No reason for the change in these values was
given in the patch comment, it broke compatibility with older
versions, and was difficult to detect by the simultaneous move of the
lines of code.
Signed-off-by: Alexander Thomas <alexander.thomas@esaturnus.com >
Cc: stable <stable@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-19 10:45:03 -07:00
Roland Vossen
14739feed0
staging: brcm80211: sparse endianness warnings on fullmac bss info
...
Structure that is received from dongle has been annotated.
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Reviewed-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:42 +02:00
Arend van Spriel
7dae3a638c
staging: brcm80211: remove static global variables from dhd_sdio.c
...
Several global variables that were set but never initialized have
been removed.
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com >
Reviewed-by: Roland Vossen <rvossen@broadcom.com >
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:42 +02:00
Arend van Spriel
22a911976f
staging: brcm80211: remove global variable from bcmsdh_sdmmc.c
...
The source file contained some static global variables that were
needed per device handled by the driver. They have moved to the
struct brcmf_sdio_dev for that reason.
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com >
Reviewed-by: Roland Vossen <rvossen@broadcom.com >
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:42 +02:00
Arend van Spriel
0569c8e2d6
staging: brcm80211: remove for_each_bss() macro from brcmfmac driver
...
The macro was only used once in the code and has been removed for
clarity reading the code.
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com >
Reviewed-by: Roland Vossen <rvossen@broadcom.com >
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:42 +02:00
Arend van Spriel
66b9aa0245
staging: brcm80211: remove brcmfmac interface name override
...
The brcmfmac had a module parameter which could be used to override
the name of the wireless net device name and it defaults to 'wlan'.
This is considered rather useless, because what is in a name.
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Roland Vossen <rvossen@broadcom.com >
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com >
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:41 +02:00
Franky Lin
5a8dc2ef78
staging: brcm80211: remove fullmac module_param for ARP offload feature
...
Use macro to replace global variable for ARP offload configuration
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Roland Vossen <rvossen@broadcom.com >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:41 +02:00
Franky Lin
8e118503b7
staging: brcm80211: remove _brcmf_sysioc_thread in fullmac
...
_brcmf_sysioc_thread is handling deferred jobs from 4 callers. Use
work queue to handle set_mac_address/set_multicast_list requests.
brcmf_add_if/brcmf_del_if never run in atomic context and can call
brcmf_op_if directly.
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Roland Vossen <rvossen@broadcom.com >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:41 +02:00
Roland Vossen
c17f70da1a
staging: brcm80211: fixed sparse endianness warnings on fullmac ratespec
...
Structure that is sent to the dongle has been annotated.
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Reviewed-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:41 +02:00
Roland Vossen
7d852d16de
staging: brcm80211: fixed sparse endianness warnings on fullmac scb pars
...
Structure that is sent to the dongle has been annotated.
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Reviewed-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:41 +02:00
Roland Vossen
c57d25025d
staging: brcm80211: fixed sparse endianness warnings on fullmac assoc pars
...
Structures that are sent to the dongle have been annotated.
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Reviewed-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:41 +02:00
Roland Vossen
66af0d7e80
staging: brcm80211: fixed sparse endianness warnings on fullmac scan pars
...
Three structures that are sent to the dongle have been annotated for correct
endianness: struct brcmf_iscan_params, brcmf_scan_params,
brcmf_cfg80211_scan_req.
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Reviewed-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:41 +02:00
Roland Vossen
90b3b115e5
staging: brcm80211: removed set_fs/get_fs/get_ds calls from brcmf_dev_ioctl()
...
brcmf_dev_ioctl() does not provide a user space buffer to
brcmf_netdev_ioctl_priv. Hence these calls are not necessary.
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Reviewed-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:40 +02:00
Roland Vossen
862c307fc1
staging: brcm80211: simplified brcmf_proto_ioctl()
...
Removed a function parameter since it was redundant.
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Reviewed-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:40 +02:00
Franky Lin
bb450766c3
staging: brcm80211: remove global variable brcmf_radio_up from fullmac
...
Remove unnecessary global variable
Reviewed-by: Roland Vossen <rvossen@broadcom.com >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:40 +02:00
Franky Lin
24d7d5e8a8
staging: brcm80211: remove global variable brcmf_roam from fullmac
...
Remove unnecessary global variable
Reviewed-by: Roland Vossen <rvossen@broadcom.com >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:40 +02:00
Franky Lin
82553d9ba3
staging: brcm80211: remove fullmac module_param for packet filter feature
...
Use constant values for packet filter configuration
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Roland Vossen <rvossen@broadcom.com >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:40 +02:00
Franky Lin
818cf60e4d
staging: brcm80211: remove fullmac module_param brcmf_deferred_tx
...
Remove brcmf_deferred_tx as it should be always 1
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Roland Vossen <rvossen@broadcom.com >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:40 +02:00
Franky Lin
6760e1ba63
staging: brcm80211: remove fullmac module_param sd_f2_blocksize
...
Replaced the global variable with macro.
Reported-by: Johannes Berg <johannes@sipsolutions.net >
Reviewed-by: Roland Vossen <rvossen@broadcom.com >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:40 +02:00
Franky Lin
e61a8fd54f
staging: brcm80211: remove SOFTAP code from fullmac
...
Dead code removal.
Reviewed-by: Roland Vossen <rvossen@broadcom.com >
Reviewed-by: Arend van Spriel <arend@broadcom.com >
Signed-off-by: Franky Lin <frankyl@broadcom.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 21:39:39 +02:00
Julia Lawall
c0569981b3
drivers/staging/mei/interface.c: take size of pointed value, not pointer
...
Sizeof a pointer-typed expression returns the size of the pointer, not that
of the pointed data.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/ )
// <smpl>
@@
expression *e;
type T;
identifier f;
@@
f(...,(T)e,...,
-sizeof(e)
+sizeof(*e)
,...)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:49:18 +02:00
Leonid V. Fedorenchik
661d3bf652
Staging: cx25821: cx25821-video.h: Fix long lines
...
Fix long function prototypes and line up arguments nicely.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:46 +02:00
Leonid V. Fedorenchik
64eb324424
Staging: cx25821: cx25821-video.h: Fix indent
...
Fix indent of function arguments.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:46 +02:00
Leonid V. Fedorenchik
9ad6902d22
Staging: cx25821: cx25821-video.h: Line up constant
...
Line up integer constant with others.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:46 +02:00
Leonid V. Fedorenchik
3038f638ac
Staging: cx25821: Replace :? by if-else in cx25821-video.c
...
Replace :? operator by equivalent if-else statement where in improves
readability. Don't add else branch if it is not needed.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:46 +02:00
Leonid V. Fedorenchik
e313e1f983
Staging: cx25821: Fix braces around statements in cx25821-video.c
...
Delete braces around single statements.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:46 +02:00
Leonid V. Fedorenchik
527db49d91
Staging: cx25821: Change indent with spaces to tabs 35
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:45 +02:00
Leonid V. Fedorenchik
fa7ce1f41d
Staging: cx25821: Change indent with spaces to tabs 34
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:45 +02:00
Leonid V. Fedorenchik
d2a167c8fc
Staging: cx25821: Change indent with spaces to tabs 33
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:45 +02:00
Leonid V. Fedorenchik
2a51749fd5
Staging: cx25821: Change indent with spaces to tabs 32
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:45 +02:00
Leonid V. Fedorenchik
12fe746fa9
Staging: cx25821: Change indent with spaces to tabs 31
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:45 +02:00
Leonid V. Fedorenchik
16a81efe88
Staging: cx25821: Change indent with spaces to tabs 30
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:45 +02:00
Leonid V. Fedorenchik
5e6440141e
Staging: cx25821: Change indent with spaces to tabs 29
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:45 +02:00
Leonid V. Fedorenchik
f9ef6be389
Staging: cx25821: Change indent with spaces to tabs 28
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:44 +02:00
Leonid V. Fedorenchik
43be3824d9
Staging: cx25821: Change indent with spaces to tabs 27
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:44 +02:00
Leonid V. Fedorenchik
6f87cc6cd9
Staging: cx25821: Change indent with spaces to tabs 26
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:44 +02:00
Leonid V. Fedorenchik
75965b8f6f
Staging: cx25821: Change indent with spaces to tabs 25
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:44 +02:00
Leonid V. Fedorenchik
8a911ed9c0
Staging: cx25821: Change indent with spaces to tabs 24
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:44 +02:00
Leonid V. Fedorenchik
e0b871bd2c
Staging: cx25821: Change indent with spaces to tabs 23
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:44 +02:00
Leonid V. Fedorenchik
70e7f145e4
Staging: cx25821: Change indent with spaces to tabs 22
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:44 +02:00
Leonid V. Fedorenchik
f9a8150c92
Staging: cx25821: Change indent with spaces to tabs 21
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:43 +02:00
Leonid V. Fedorenchik
02859b61cc
Staging: cx25821: Change indent with spaces to tabs 20
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:43 +02:00
Leonid V. Fedorenchik
6678762aa2
Staging: cx25821: Change indent with spaces to tabs 19
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:43 +02:00
Leonid V. Fedorenchik
255c040a42
Staging: cx25821: Change indent with spaces to tabs 18
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:43 +02:00
Leonid V. Fedorenchik
a39bea3a4e
Staging: cx25821: Change indent with spaces to tabs 17
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:43 +02:00
Leonid V. Fedorenchik
eda59eb189
Staging: cx25821: Change indent with spaces to tabs 16
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:43 +02:00
Leonid V. Fedorenchik
3f3d9e4a54
Staging: cx25821: Change indent with spaces to tabs 15
...
Change indent with spaces to tabs.
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2011-09-16 20:45:43 +02:00