Commit graph

1086 commits

Author SHA1 Message Date
Linus Torvalds 23908db413 Staging driver patches for 4.2-rc1
Here's the big, really big, staging tree patches for 4.2-rc1.
 
 Loads of stuff in here, almost all just coding style fixes / churn, and
 a few new drivers as well, one of which I just disabled from the build a
 few minutes ago due to way too many build warnings.
 
 Other than the one "disable this driver" patch, all of these have been
 in linux-next for quite a while with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlWNpc0ACgkQMUfUDdst+ym8EgCg0pL1Qcf9Se3jAc96fLt+itpv
 Rd0AoI9uJcq8Qm7d+IXnz3ojLnN9xvN3
 =xt0u
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here's the big, really big, staging tree patches for 4.2-rc1.

  Loads of stuff in here, almost all just coding style fixes / churn,
  and a few new drivers as well, one of which I just disabled from the
  build a few minutes ago due to way too many build warnings.

  Other than the one "disable this driver" patch, all of these have been
  in linux-next for quite a while with no reported issues"

* tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1163 commits)
  staging: wilc1000: disable driver due to build warnings
  Staging: rts5208: fix CHANGE_LINK_STATE value
  Staging: sm750fb: ddk750_swi2c.c: Insert spaces before parenthesis
  Staging: sm750fb: ddk750_swi2c.c: Place braces on correct lines
  Staging: sm750fb: ddk750_swi2c.c: Insert spaces around operators
  Staging: sm750fb: ddk750_swi2c.c: Replace spaces with tabs
  Staging: sm750fb: ddk750_swi2c.h: Shorten lines to under 80 characters
  Staging: sm750fb: ddk750_swi2c.h: Replace spaces with tabs
  Staging: sm750fb: modedb.h: Shorten lines to under 80 characters
  Staging: sm750fb: modedb.h: Replace spaces with tabs
  staging: comedi: addi_apci_3120: rename 'this_board' variables
  staging: comedi: addi_apci_1516: rename 'this_board' variables
  staging: comedi: ni_atmio: cleanup ni_getboardtype()
  staging: comedi: vmk80xx: sanity check context used to get the boardinfo
  staging: comedi: vmk80xx: rename 'boardinfo' variables
  staging: comedi: dt3000: rename 'this_board' variables
  staging: comedi: adv_pci_dio: rename 'this_board' variables
  staging: comedi: cb_pcidas64: rename 'thisboard' variables
  staging: comedi: cb_pcidas: rename 'thisboard' variables
  staging: comedi: me4000: rename 'thisboard' variables
  ...
2015-06-26 15:46:08 -07:00
Prasanna Karthik 3bfef65008 staging:rtl8723au: Fix return statement reported by coccinelle
Modified return statement and removed local declaration no longer
needed. No Compiler warnings.

Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:25:24 -07:00
Daniele Alessandrelli 5534b8a190 staging: rtl8723au: include/rtl8723a_hal.h: use __leXX types in fw header struct
This patch makes fields in struct rt_8723a_firmware_hdr use
endianness-aware types (__leXX), thus fixing the following sparse warnings:

CHECK   drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:263:37: warning: cast to
restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:265:39: warning: cast to
restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:277:13: warning: cast to
restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:277:13: warning: cast to
restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:277:13: warning: cast to
restricted __le16

Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:25:24 -07:00
Daniele Alessandrelli ff8453b313 staging: rtl8723au: include/rtl8723a_hal.h: fix Rsvd1 size in fw header struct
The size of field Rsvd1 in struct rt_8723a_firmware_hdr should be u8
otherwise we exceeds the boundaries of "LONG WORD 0". This patch fixes
the issue.

Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@gmail.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:25:24 -07:00
Andreas Ruprecht 07a55cd9b2 staging: rtl8723au: core: Remove unneeded #ifdefs
In rtw_mlme_ext.c, nested #ifdef blocks form the following
structure inside the file:

 #ifdef CONFIG_8723AU_AP_MODE           (line 1323)
 [...]
 #ifdef CONFIG_8723AU_AP_MODE           (line 1720)
 [...]
 #endif
 (2 more ifdef blocks with CONFIG_8723AU_AP_MODE follow)
 [...]
 #endif /* CONFIG_8723AU_AP_MODE */     (line 1763)

The inner #ifdefs are unnecessary as they depend on the
same condition as the outer #ifdef and can thus be removed.

Signed-off-by: Andreas Ruprecht <andreas.ruprecht@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:25:23 -07:00
Joglekar Tejas 2a049f7e64 staging:rtl8723au:rtw_ap:space prohibited between function name & '('
This patch removes the warning "space prohibited between
function name and open parenthesis"given by checkpatch.pl

Signed-off-by: Joglekar Tejas <tjogleka@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-13 21:41:42 -07:00
Joglekar Tejas 73250a7311 staging:rtl8723au:ioctl_cfg80211:spaces required around '>'
This patch removes the error given by checkpatch.pl
" spaces required around that '>' "

Signed-off-by: Joglekar Tejas <tjogleka@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-13 20:43:43 -07:00
Luca Ceresoli 863eaa79ba staging: rtl8723au: issue_probersp(): remove unused parameter
The is_valid_p2p_probereq is never referenced in the function body.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:22:06 -07:00
Fabian Frederick 2ccd94e412 staging: rtl8723au: use swap() in WMMOnAssocRsp23a()
Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:19:47 -07:00
David Decotigny 02632342d4 staging: rtl8723au: core: remove redundant endianness conversion
Source and destination have the same little-endian annotation: this
patch removes incorrect byte-swap on non-LE cpus.

This addresses the following sparse warning:
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3911:56: warning: incorrect type in argument 1 (different base types)
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3911:56:    expected unsigned short [unsigned] [usertype] val
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3911:56:    got restricted __le16 [usertype] BA_timeout_value

Signed-off-by: David Decotigny <ddecotig@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:23:53 -07:00
David Decotigny af17b56d1f staging: rtl8723au: core: avoid bitwise arithmetic with forced endianness
This fixes bitwise arithmetic performed on the host on a variable
previously converted to little-endian, and subsequently converted
again to little-endian:
  - issue_action_BA23a() called with "status" crafted in host byte order
  - "status" converted to LE
  - bitwise arithmetic on the (LE) "status", performed with masks and
    shifts in host byte order
  - result converted to LE (again) and stored in device structure

Sparse warning addressed by this patch:
  drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3806:16: warning: incorrect type in assignment (different base types)
  drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3806:16:    expected unsigned short [unsigned] status
  drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3806:16:    got restricted __le16 [usertype] <noident>

Additional notes: initial cpu_to_le16 was introduced by kernel bulk
  commit 5e93f3520 "staging: r8723au: Add source files for new driver
  - part 1", initially from github according to commit description. On
  github, this traces back to another bulk commit: 2896bda04353 "Add
  new files in core directory", which is the 1st version of the
  driver.

Signed-off-by: David Decotigny <ddecotig@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:23:52 -07:00
Luca Ceresoli e630eb48ff staging: rtl8723au: remove useless comment
"step 2" does mean much as there is no "step 1" stated anywhere...

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:22:45 +09:00
Luca Ceresoli b2f23a2d71 staging: rtl8723au: remove useless return value
The loadparam() function cannot fail, it's called only once and its return
value is ignored there.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:22:44 +09:00
Juston Li 711c9b3ce4 staging: rtl8723au: fix sparse warning
change cast to __le16 to fix the following warning:
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1488:20: warning: cast to restricted __le16

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:22:44 +09:00
Gujulan Elango, Hari Prasath (H.) 77198552a4 staging: rtl8723au: remove redundant initialization
The variable pHalData is initialized twice in this same function with
same value.So removing one of them.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:22:44 +09:00
Johannes Berg 80279fb7ba cfg80211: properly send NL80211_ATTR_DISCONNECTED_BY_AP in disconnect
When we disconnect from the AP, drivers call cfg80211_disconnect().
This doesn't know whether the disconnection was initiated locally
or by the AP though, which can cause problems with the supplicant,
for example with WPS. This issue obviously doesn't show up with any
mac80211 based driver since mac80211 doesn't call this function.

Fix this by requiring drivers to indicate whether the disconnect is
locally generated or not. I've tried to update the drivers, but may
not have gotten the values correct, and some drivers may currently
not be able to report correct values. In case of doubt I left it at
false, which is the current behaviour.

For libertas, make adjustments as indicated by Dan Williams.

Reported-by: Matthieu Mauger <matthieux.mauger@intel.com>
Tested-by: Matthieu Mauger <matthieux.mauger@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-05-26 15:21:27 +02:00
Edward Lipinsky 95829dcbee Staging: rtl8723au: hal: Remove trailing whitespace in odm.c
This patch fixes the checkpatch.pl error:

ERROR: trailing whitespace

Signed-off-by: Edward Lipinsky <ellipinsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:09 +02:00
Carlos E. Garcia 69e98df782 Staging: fixed multiple spelling errors.
Fixed multiple spelling errors.

Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:23:58 +02:00
Linus Torvalds 6c373ca893 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:

 1) Add BQL support to via-rhine, from Tino Reichardt.

 2) Integrate SWITCHDEV layer support into the DSA layer, so DSA drivers
    can support hw switch offloading.  From Floria Fainelli.

 3) Allow 'ip address' commands to initiate multicast group join/leave,
    from Madhu Challa.

 4) Many ipv4 FIB lookup optimizations from Alexander Duyck.

 5) Support EBPF in cls_bpf classifier and act_bpf action, from Daniel
    Borkmann.

 6) Remove the ugly compat support in ARP for ugly layers like ax25,
    rose, etc.  And use this to clean up the neigh layer, then use it to
    implement MPLS support.  All from Eric Biederman.

 7) Support L3 forwarding offloading in switches, from Scott Feldman.

 8) Collapse the LOCAL and MAIN ipv4 FIB tables when possible, to speed
    up route lookups even further.  From Alexander Duyck.

 9) Many improvements and bug fixes to the rhashtable implementation,
    from Herbert Xu and Thomas Graf.  In particular, in the case where
    an rhashtable user bulk adds a large number of items into an empty
    table, we expand the table much more sanely.

10) Don't make the tcp_metrics hash table per-namespace, from Eric
    Biederman.

11) Extend EBPF to access SKB fields, from Alexei Starovoitov.

12) Split out new connection request sockets so that they can be
    established in the main hash table.  Much less false sharing since
    hash lookups go direct to the request sockets instead of having to
    go first to the listener then to the request socks hashed
    underneath.  From Eric Dumazet.

13) Add async I/O support for crytpo AF_ALG sockets, from Tadeusz Struk.

14) Support stable privacy address generation for RFC7217 in IPV6.  From
    Hannes Frederic Sowa.

15) Hash network namespace into IP frag IDs, also from Hannes Frederic
    Sowa.

16) Convert PTP get/set methods to use 64-bit time, from Richard
    Cochran.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1816 commits)
  fm10k: Bump driver version to 0.15.2
  fm10k: corrected VF multicast update
  fm10k: mbx_update_max_size does not drop all oversized messages
  fm10k: reset head instead of calling update_max_size
  fm10k: renamed mbx_tx_dropped to mbx_tx_oversized
  fm10k: update xcast mode before synchronizing multicast addresses
  fm10k: start service timer on probe
  fm10k: fix function header comment
  fm10k: comment next_vf_mbx flow
  fm10k: don't handle mailbox events in iov_event path and always process mailbox
  fm10k: use separate workqueue for fm10k driver
  fm10k: Set PF queues to unlimited bandwidth during virtualization
  fm10k: expose tx_timeout_count as an ethtool stat
  fm10k: only increment tx_timeout_count in Tx hang path
  fm10k: remove extraneous "Reset interface" message
  fm10k: separate PF only stats so that VF does not display them
  fm10k: use hw->mac.max_queues for stats
  fm10k: only show actual queues, not the maximum in hardware
  fm10k: allow creation of VLAN on default vid
  fm10k: fix unused warnings
  ...
2015-04-15 09:00:47 -07:00
M. Vefa Bicakci 28eb1f3b64 staging: rtl8723au: Remove unneeded comments
This commit removes a number of unneeded comments. Two of the
aforementioned comments were most likely meant to aid with version
control, whereas the remaining two comments relate to (now unused)
local variable names.

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:47 +02:00
M. Vefa Bicakci 58b39a9097 staging: rtl8723au: Use __func__ in trace logs
Rework the trace log-related lines in rtl8723au's rtw_security.c
to use the __func__ GCC magic variable instead of hardcoding the
function names into the trace log strings. This also corrects a
copy-paste-related typo in the function named rtw_tkip_decrypt23a.

Thanks to Jes Sorensen for the suggestion to use __func__.

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:46 +02:00
M. Vefa Bicakci 87a432944f staging: rtl8723au: Rework two byte array comparisons
Prior to this commit, rtl8723au's rtw_security.c had two instances of
byte array comparisons (for CRC checks) where the individual elements
of the byte arrays were compared one by one and an error trace would
be output if the byte arrays were determined to be different.

This commit improves the readability of the CRC verification by
placing the individual 4 bytes of each byte array into an 32-bit
unsigned integer and comparing the two resulting integers.

Thanks to Larry Finger for spotting the code style issues in the
previous version of this commit, and thanks to Joe Perches for
suggesting the use of 32-bit integer comparisons instead of byte
array comparisons.

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:46 +02:00
M. Vefa Bicakci 046ca5f7e1 staging: rtl8723au: suspect code indent for conditional statements
Correct a number of indentation-with-spaces-and-tabs issues in
rtl8723au's rtw_security.c, according to checkpatch.pl:
	WARNING: suspect code indent for conditional statements

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:46 +02:00
M. Vefa Bicakci 1d6b1ac0b6 staging: rtl8723au: Adjust whitespace in and around comments
As the subject indicates, adjust whitespace in and around comments
in rtl8723au's rtw_security.c.

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:46 +02:00
M. Vefa Bicakci 268523aa6a staging: rtl8723au: No spaces at the start of a line
Prior to this commit, a large block of constants used to represent
an AES S-box table were indented with spaces in rtl8723au's
rtw_security.c. Correct the checkpatch.pl warnings indicating that
spaces should not be used to indent lines:
	WARNING: please, no spaces at the start of a line

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:46 +02:00
M. Vefa Bicakci 3104ebad91 staging: rtl8723au: that open brace should be on the previous line
Correct two instances of the checkpatch.pl error indicating that the
opening curly braces should not be on new lines:
	ERROR: that open brace { should be on the previous line

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:46 +02:00
M. Vefa Bicakci 06641b2a38 staging: rtl8723au: trailing statements should be on next line
Correct a number of checkpatch.pl errors in rtl8723au's rtw_security.c
related to trailing statements:
	ERROR: trailing statements should be on next line

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:45 +02:00
M. Vefa Bicakci 47b720a16c staging: rtl8723au: Remove unneeded curly braces
Correct a number of checkpatch.pl warnings in rtl8723au's rtw_security.c
related to the existence of unnecessary curly braces around single
statement blocks:
	WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:45 +02:00
M. Vefa Bicakci 444c704321 staging: rtl8723au: else is not generally useful after a return
Correct a checkpatch.pl warning regarding rtl8723au's
rtw_security.c::crc32_init pointing out that having an else statement
after a break or a return is not useful.

drivers/staging/rtl8723au/core/rtw_security.c:105:
	WARNING: else is not generally useful after a break or return

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:45 +02:00
M. Vefa Bicakci c3cc7593ec staging: rtl8723au: Reorganize a few functions to remove indentation
Prior to this commit, functions rtw_tkip_encrypt23a and rtw_tkip_decrypt23a had
large if blocks which contained the majority of the logic in the functions.

Rework these functions so that if the negated version of the aforementioned if
blocks' conditions are true, we return from the function with _FAIL, as
expected by the calling code.

This lets us remove two levels of indentation from the functions in
question, making them more readable.

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:45 +02:00
M. Vefa Bicakci a239023958 staging: rtl8723au: Fix the indentation of two lines
Correct the indentation of two lines in rtw_tkip_encrypt23a function in
rtl8723au's rtw_security.c.

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:45 +02:00
M. Vefa Bicakci 2d7b3a7bb8 staging: rtl8723au: else should follow close brace
Correct checkpatch.pl errors in rtl8723au's rtw_security.c indicating
that an else statement should follow the closing brace of the previous
if/else if code block:
	ERROR: else should follow close brace '}'

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:45 +02:00
M. Vefa Bicakci 9c0cfd4b6f staging: rtl8723au: Fix "before/around/after" whitespace issues
Correct a number of "space(s) required before/around/after" checkpatch.pl
issues in a number of functions in rtl8723au's rtw_security.c.

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:25:45 +02:00
M. Vefa Bicakci f5d8bde742 staging: rtl8723au: Reformat whitespace to increase readability
Adjust the whitespace in the signature, local variable declaration and
initialization parts of a number of functions to increase readability
in rtl8723au's rtw_security.c.

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:15:41 +02:00
Piotr Witoslawski d049c7f819 drivers: staging: rtl8723au: fix "warning: cast to restricted __le16"
This patch fixes the sparse warning: "cast to restricted __le16" reported
for rtl8723au/hal/rtl8723au_xmit.c

Signed-off-by: Piotr Witoslawski <pwitos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:12:54 +02:00
Tom Gundersen 6bab2e19c5 cfg80211: pass name_assign_type to rdev_add_virtual_intf()
This will expose in /sys whether the ifname of a device is set by
userspace or generated by the kernel. The latter kind (wlanX, etc)
is not deterministic, so userspace needs to rename these devices
to names that are guaranteed to stay the same between reboots. The
former, however should never be renamed, so userspace needs to be
able to reliably tell the difference.

Similar functionality was introduced for the rtnetlink core in
commit 5517750f05 ("net: rtnetlink - make create_link take name_assign_type")

Signed-off-by: Tom Gundersen <teg@jklm.no>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Arend van Spriel <arend@broadcom.com>
Cc: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Cc: Hante Meuleman <meuleman@broadcom.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
[reformat changelog to fit 72 cols]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-30 10:36:17 +02:00
Joe Perches 90403aa118 staging: rtl8723au: Update RT_TRACE macro and uses
Create an rt_trace function using %pV to reduce overall code size.
Update the macro uses to remove unnecessary and now harmful parentheses.

Miscellanea around these changes:

o Coalesce formats
o Realign arguments
o Remove commented-out RT_TRACE uses
o Spelling fixes in formats
o Add missing newlines to formats
o Remove multiple newlines from formats
o Neaten formats where noticed
o Use %pM in one instance

Reduces code size ~20KB

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:15:07 +01:00
Joe Perches ea07278681 staging: rtl8723au: Remove uses of MAC_FMT and MAC_ARG
Use the standard vsprintf kernel extension to format
mac addresses.

This reduces object code size a bit.

Miscellanea:

o Coalesce formats
o Realign arguments
o Remove the now unused MAC_FMT and MAC_ARG #defines

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:09:35 +01:00
Somya Anand a51bab6d42 Staging: rtl8723au: Remove unused function rtw_atimdone_event_callback23a
This patch fixes the following sparse warning:

warning: symbol 'rtw_atimdone_event_callback23a' was not declared.
Should it be static?
rtw_atimdone_event_callback23a is local to the file rtw_mlme.c but
it isn't exposed in a header file anywhere. Moreover it is never called
from anywhere as well.

So, this patch removes this function completely.

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23 22:41:16 +01:00
Jes Sorensen 5026df93d2 staging: rtl8723au: Do not byteswap timeout twice
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23 22:40:30 +01:00
Jes Sorensen a113b53cd3 staging: rtl8723au: update_txdesc(): bagg_pkt is always false
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23 22:40:29 +01:00
Jes Sorensen 18f576f6da staging: rtl8723au: Fix trailing whitespace
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23 22:40:29 +01:00
Jes Sorensen ed2be12e0a staging: rtl8723au: Fix mis-placed break
In 7c3a8f2a5e I made a mistake and moved
a break below a bracket, causing a situation where the for loop would
always exit when it shouldn't.

This patch corrects that mistake.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23 22:40:29 +01:00
Haneen Mohammed acc4b97b3b Staging: rtl8723au: Remove parentheses around right side an assignment
Parentheses are not needed around the right hand side of an assignment.
This patch remove parenthese of such occurenses. Issue was detected and
solved using the following coccinelle script:

@rule1@
identifier x, y, z;
expression E1, E2;
@@

(
x = (y == z);
|
x = (E1 == E2);
|
 x =
-(
...
-)
 ;
)

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:23:44 +01:00
Supriya Karanth e719bba855 staging: rtl8723au: remove intialization of static ints
static ints are initialized to 0 by the compiler.
Explicit initialization is not necessary.

Found by checkpatch.pl - ERROR: do not initialise statics to 0 or NULL

changes made using coccinelle script:
@@
type T;
identifier var;
@@
static T var
- =0
;

Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:17:31 +01:00
Tina Johnson c89ca085a5 drivers: staging: rtl8723au: hal: Removed unnecessary parentheses
Parentheses around the right side of an assignment statement are
unnecessary and hence removed. Coccinelle was used to produce the
patch:

@rule1@
identifier x,y;
constant c;
@@

(

 x =
-(
 y << c
-)
 ;
|
 x =
-(
 y >> c
-)
 ;
|
 x =
-(
 y + c
-)
 ;
|
 x =
-(
 y - c
-)
 ;

)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:37:22 +01:00
Tina Johnson 143ff11955 drivers: staging: rtl8723au: core: Removed unnecessary parentheses
Parentheses around the right side of an assignment statement are
unnecessary and hence removed. Coccinelle was used to produce the
patch:

@rule1@
identifier x,y;
constant c;
@@

(

 x =
-(
 y << c
-)
 ;
|
 x =
-(
 y >> c
-)
 ;
|
 x =
-(
 y + c
-)
 ;
|
 x =
-(
 y - c
-)
 ;

)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:37:22 +01:00
Jes Sorensen 6725e52d22 staging: rtl8723au: Eliminate ODM_SetBBReg()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:22:44 -08:00
Jes Sorensen 2635f19c7a staging: rtl8723au: odm.c: Further reduce the use of ODM_SetBBReg()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:22:28 -08:00
Jes Sorensen 3f9cb6a093 staging: rtl8723au: Eliminate ODM_GetBBReg()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:14:44 -08:00