David Matlack
65bc0aaa9c
staging: slicoss: fix use-after-free in slic_entry_probe
...
This patch fixes a use-after-free bug that can cause a kernel
oops. If slic_card_init fails then slic_entry_probe (the pci
probe() function for this device) will return error without
cleaning up memory.
Signed-off-by: David Matlack <dmatlack@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 20:08:33 +09:00
Paul McQuade
8522851e3b
Staging:Octeon-usb:octeon-hcd.c return value
...
return value instead of function.
Signed-off-by: Paul McQuade <paulmcquad@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:36:16 +09:00
Benoit Taine
4a6eea4dcb
staging: rtl8723au: Use kmemdup() instead of memcpy() to duplicate memory
...
This issue was reported by coccicheck using the semantic patch
at scripts/coccinelle/api/memdup.cocci, and tested by compilation.
Signed-off-by: Benoit Taine <benoit.taine@lip6.fr >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:33:05 +09:00
Joe Perches
48039e70b6
staging: realtek: Convert /n to \n
...
Use proper line terminations.
Signed-off-by: Joe Perches <joe@perches.com >
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:53 +09:00
Karim Raslan
be13f29191
staging: rtl8723au: rtw_sta_mgt: change rtw_alloc_stainfo23a to use gfp_t instead if int
...
This should fix a few sparse warnings like the following:
CHECK drivers/staging/rtl8723au/core/rtw_ap.c
drivers/staging/rtl8723au/core/rtw_ap.c:1054:45: warning: incorrect type in argument 3 (different base types)
drivers/staging/rtl8723au/core/rtw_ap.c:1054:45: expected int [signed] gfp
drivers/staging/rtl8723au/core/rtw_ap.c:1054:45: got restricted gfp_t
Signed-off-by: Karim Raslan <karim.allah.ahmed@gmail.com >
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:53 +09:00
Jes Sorensen
d5bacb1a35
staging: rtl8723au: rtw_mlme_ext.c: Fixup some more unreadable formatting
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:53 +09:00
Jes Sorensen
1feec0d8d8
staging: rtl8723au: rtw_mlme_ext.c: Improve bad formatting in event handlers
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:52 +09:00
Jes Sorensen
662c9bf87e
staging: rtl8723au: Declare rtw_site_survey() static
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:52 +09:00
Jes Sorensen
96df4b65f3
staging: rtl8723au: Remove obsolete rtw_action_frame_parse23a()
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:52 +09:00
Jes Sorensen
ea2ea44079
staging: rtl8723au: rtw_cfg80211_rx_action(): Use ieee80211_mgmt to parse action frame
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:52 +09:00
Jes Sorensen
38eb09b5be
staging: rtl8723au: rtw_cfg80211_monitor_if_xmit_entry() use struct ieee80211_mgmt
...
Use struct ieee80211_mgmt to parse action frame. In addition remove
unused functions rtw_cfg80211_rx_p2p_action_public() and
rtw_cfg80211_rx_action_p2p()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:52 +09:00
Jes Sorensen
56b8412996
staging: rtl8723au: rtw_get_bcn_info23a(): Don't zero variables unncessarily
...
In addition remove excessive brackets.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:51 +09:00
Jes Sorensen
a9e9d363a0
staging: rtl8723au: rtw_get_bcn_info23a(): Use cfg80211_find_ie()
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:51 +09:00
Jes Sorensen
7f234006d4
staging: rtl8723au: rtw_ieee80211.c: Remove a number of unused functions
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:51 +09:00
Jes Sorensen
60682873a0
staging: rtl8723au: rtw_cmd.h: Remove some more unused #defines
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:51 +09:00
Jes Sorensen
77931b7b54
staging: rtl8723au: Get rid of some unused tdls definitions
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:51 +09:00
Jes Sorensen
cdaf6ef767
staging: rtl8723au: Move dummy_event_callback() to rtw_mlme_ext.c
...
In addition get rid of a couple of empty *_event_callback() handlers
and use dummy_event_callback() instead.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:51 +09:00
Jes Sorensen
41a5a460ed
staging: rtl8723au: Get rid of unused get_bsstype23a()
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:50 +09:00
Jes Sorensen
9b0cb4b6a6
staging: rtl8723au: Declare SetBWMode23a() static
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:50 +09:00
Jes Sorensen
f3c9d6409b
staging: rtl8723au: Don't compile rtw_ap.c when CONFIG_8723AU_AP_MODE=n
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:50 +09:00
Jes Sorensen
a402b8003c
staging: rtl8723au: rtw_mlme_ext.c: Fix compile warnings
...
Fixup #ifdefs to not build issue_assocrsp() and OnAuth23a() when
CONFIG_8723AU_AP_MODE is not set.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:50 +09:00
Jes Sorensen
0e176853f9
staging: rtl8723au: rtw_mlme_ext.c: Declare a number of functions static
...
These are all just used locally, no point cluttering the kernel
namespace with them.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:50 +09:00
Jes Sorensen
33a46422a0
staging: rtl8723au: wifi.h: Get rid of last ugly frame_control manipulation macros
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:49 +09:00
Jes Sorensen
cade4108a8
staging: rtl8723au: rtl8723a_cmd.c: Get rid of SetToDs()/SetFrDs() usage
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:49 +09:00
Jes Sorensen
c26e95737b
staging: rtl8723au: rtw_xmit.c: Get rid of SetToDs()/SetFrDs() usage
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:49 +09:00
Jes Sorensen
863b314f84
staging: rtl8723au: rtw_mlme_ext.c: Get rid of SetToDs()/SetFrDs() usage
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:49 +09:00
Jes Sorensen
d181ee3726
staging: rtl8723au: Get rid of duplicate ieee80211 frame_control defines
...
This is all defined nicely in ieee80211.h, this was all duplication
serving no other purpose than to obfuscate the code.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:49 +09:00
Jes Sorensen
6ebd294804
staging: rtl8723au: Fix issue_assocrsp() to use IEEE80211_STYPE_* defines
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:49 +09:00
Jes Sorensen
5986a3f23a
staging: rtl8723au: Declare issue_asocrsp() static
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:48 +09:00
Jes Sorensen
c2bfb149b4
staging: rtl8723au: rtw_mlme_ext.c: Get rid of most WIFI_* frame type usage
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:48 +09:00
Jes Sorensen
036cdd9cb3
staging: rtl8723au: ioctl_cfg80211.c: Use ieee80211.h provided fctl bits
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:48 +09:00
Jes Sorensen
6023377b47
staging: rtl8723au: rtl8723a_cmd.c: Use ieee80211.h provided fctl bits
...
v2: Fix endian bug reported by Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:48 +09:00
Jes Sorensen
b2f72caefe
staging: rtl8723au: rtw_xmit.c: Use IEEE80211_[FS]TYPE_ defines
...
In addition pkt_attrib->type a u16 and get rid of pattrib->stype
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:48 +09:00
Jes Sorensen
0d280584c0
staging: rtl8723au: Remove unused SetFrameType() macro
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:47 +09:00
Jes Sorensen
cd70034159
staging: rtl8723au: Get rid of obsolete SetPriority()/SetEOSP()/SetAckpolicy()
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:47 +09:00
Jes Sorensen
24af77b4af
staging: rtl8723au: _issue_qos_nulldata23a(): Use struct ieee80211_qos_hdr
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:47 +09:00
Jes Sorensen
e5b2a429f0
staging: rl8723au: rtw_make_wlanhdr(): Use ieee80211_qos_hdr
...
Use the kernel provided struct and defines to fill in qos_ctrl
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:47 +09:00
Jes Sorensen
ec3f4e2ae1
staging: rtl8723au: rtl8723a_cmd.c: Use ieee80211.h defines to set qos_ctrl
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:47 +09:00
Jes Sorensen
316f6211b4
staging: rtl8723au: rtl8723a_update_ramask(): Get rid of annoying debug message
...
There really is no need to print this message for anyone not trying to
debug the driver:
rtl8723a_update_ramask => mac_id:0, networkType:0x0b, mask:0x000fffff
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:47 +09:00
Jes Sorensen
c6716e1f84
staging: rtl8723au: Get rid of SetPrivacy()/SetPwrMgt()/SetMData() macros
...
Set these bits directly in the code instead of fiddling with wrapper
macros.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:46 +09:00
Jes Sorensen
fd602993ba
staging: rtl8723au: Get rid of ugly SetDuration() macro usage
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:46 +09:00
Jes Sorensen
2bdbf939e0
staging: rtl8723au: wifi.h: Remove unused SetFragNum() macro
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:46 +09:00
Jes Sorensen
aeda82507d
staging: rtl8723au: Get rid of SetSeqNum()
...
In every last use case, the header was just cleared with memset() so
there is no need to use the complex SetSeqNum() macro when
cpu_to_le16(IEEE80211_SN_TO_SEQ()) output will do just fine.
In addition, get rid of __le16 *fctrl usage when there is no need for
it.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:46 +09:00
Jes Sorensen
39ef89153c
staging: rtl8723au: Declare rtw_make_wlanhdr() static
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:46 +09:00
Jes Sorensen
670ce6889c
staging: rtl8723au: rtw_make_wlanhdr23a(): Use IEEE80211_SN_TO_SEQ() to set seq_ctrl
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:46 +09:00
Jes Sorensen
0b218f4c6b
staging: rtl8723au: rtl8723a_cmd.c: Properly initialize seq_ctrl
...
Control frames will not be fragmented, so we should fully initialize
the seq_ctrl field to zero. This avoids leftover stack bits remaining
set in the generated frame's seq_ctrl field.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:45 +09:00
Jes Sorensen
1daffaeecb
staging: rtl8723au: ioctl_cfg80211.c: Properly initialize seq_ctrl
...
Using SetSeqNum() on an uninitialized stack frame leaves us open to
leaving random fragment bits set in seq_ctrl in the frame header.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:45 +09:00
Jes Sorensen
9a7e35f1ea
staging: rtl8723au: rtw_cfg80211_inform_bss(): Use get_unaligned_le16()
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:45 +09:00
Jes Sorensen
14423cd702
staging: rtl8723au: ioctl_cfg80211.c: Rip out < 3.14 kernel support
...
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:45 +09:00
Jes Sorensen
aa69fa6571
staging: rtl8723au: cfg80211_rtw_mgmt_tx(): type is always -1
...
Rip out P2P defines since they are effectively never used.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-23 16:27:45 +09:00