Commit graph

346 commits

Author SHA1 Message Date
Xenia Ragiadakou deba326bfd staging: rtl8192u: remove r8180_pm.c and r8180_pm.h
This patch removes r8180_pm.h and r8180_pm.c from rtl8192u because they
are not used anywhere in the driver.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:44:23 -07:00
Xenia Ragiadakou 1bafe45f9b staging: rtl8192u: fix line size in r819xU_HTType.h
This patch fixes the following checkpatch warning in r819xU_HTType.h:
WARNING: line over 80 characters

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:55 -07:00
Xenia Ragiadakou b812fd3b57 staging: rtl8192u: add parenthesis around complex macros in r819xU_HTType.h
This patch fixes the following checkpatch error:
ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:55 -07:00
Xenia Ragiadakou b3052681e8 staging: rtl8192u: add space after ',' in r819xU_HTType.h
This patch fixes the following checkpatch error:
ERROR: space required after that ','

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou 1f7750343d staging: rtl8192u: fix alignment in r819xU_HTType.h
This patch fixes some alignment issues in r819xU_HTType.h to impreove code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou 3652701608 staging: rtl8192u: fix comments in r819xU_HTType.h
This patch fixes comments in r819xU_HTType.h by:
* replacing // commments with /* */ comments
* removing author and date information from comments
* removing unnecessary comments

This is done to improve code readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou 5b33b605e2 staging: rtl8192u: fix space around braces in r819xU_HTType.h
This patch fixes the white space around braces in r819xU_HTType.h according
to the linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou 889cfe2f03 staging: rtl8192u: use __packed instead of __attribute__((packed))
This patch fixes the following checkpatch warning:
WARNING: __packed is preferred over __attribute__((packed))

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou f96f8df28c staging: rtl8192u: fix open brace position in r819xU_cmdpkt.h
This patch fixes the following checkpatch warning and error:
WARNING: missing space after enum definition
ERROR: open brace '{' following enum go on the same line

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou feada066c8 staging: rtl8192u: fix alignment in r819xU_cmdpkt.h
This patch fixes alignment issues in r819xU_cmdpkt.h to improve code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou acd537427c staging: rtl8192u: fix space after ( in r819xU_cmdpkt.h
This patch removes prohibited space after ( in r819xU_cmdpkt.h according to
the linux kernel coding style convention.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou b7cc1d0ce9 staging: rtl8192u: fix space at the start of lines in r819xU_cmdpkt.h
This patch fixes the following checkpatch warning:
WARNING: please, no spaces at the start of a line

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou 56340097ca staging: rtl8192u: fix comments in r819xU_cmdpkt.h
This patch fixes the comments in r819xU_cmdpkt.h by:
* removing any empty or unnecessary comments
* replacing the // comments with /* */ comments
* removing date and author information from comments

This is done to improve code readability and to conform to linux kernel
coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou b777736b47 staging: rtl8192u: fix line size in r819xU_cmdpkt.h
This patch reduces the line length below 80 chars to improve code readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou 8f519cad49 staging: rtl8192u: add space after } and , in r819xU_cmdpkt.h
This patch fixes white space after } and , so that the code becomes more
readable and conforms to the linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou aa0cb59cfa staging: rtl8192u: remove #ifdef JOHN_
This patch removes the guards #ifdef JOHN_HWSEC, #ifdef JOHN_DUMP_TXDESC and
because the code inside them calls some undefined functions (e.g read_rtl8225,
rtl8187_read_phy etc).

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Sachin Kamat 875d2a134e staging: rtl8192u: Use NULL instead of 0
Use NULL instead of 0 for pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:31 -07:00
Greg Kroah-Hartman 73b2277718 Merge 3.12-rc3 into staging-next
We want the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-29 18:42:21 -07:00
Iker Pedrosa c3aed2312f Staging: rtl8192u: r819xU_cmdpkt: checking NULL value after doing dev_alloc_skb
Checking the return of dev_alloc_skb as stated in the following bug: https://bugzilla.kernel.org/show_bug.cgi?id=60411

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Reported-by: RUC_Soft_Sec rucsoftsec@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:53:39 -07:00
Xenia Ragiadakou ab00bf09ec staging: rt8192u: remove #ifdef RTL8192U in r8192U.h
This patch removes #ifdef RTL8192U header guard and the code that falls
outside it, since RTL8192U is defined.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:25 -07:00
Xenia Ragiadakou b679228808 staging: rtl8192u: remove code inside #ifdef RTL8190P in r8190_rtl8256.h
This patch removes the unused code inside #ifdef RTL8190P header guard,
since RTL8190P is not defined.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:24 -07:00
Xenia Ragiadakou 97d6f4a9f9 staging: rtl8192u: remove #ifndef RTL8192U and the code inside it
This patch removes the unused code inside #ifndef RTL8192U header guard
and the guard itself, since RTL8192U is defined.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:24 -07:00
Xenia Ragiadakou f326fe2a63 staging: rtl8192u: remove #ifndef RTL8190P guard from r8192U_dm.c
This patch removes #ifndef RTL8190P header guard since RTL8190P is not
defined anywhere in rtl8192u code.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:24 -07:00
Xenia Ragiadakou 91e39f09e5 staging: rtl8192u: remove code inside #ifdef RTL8190P in r8192U_dm.c
This patch removes the unused code that resides inside #ifdef RTL8190P
header guard since RTL8190P is not defined.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:24 -07:00
Xenia Ragiadakou ba9aabb710 staging: rtl8192u: remove code inside #ifdef RTL8190P in r819xU_firmware.c
This patch removes the unused code that resides inside #ifdef RTL8190P since
RTL8190P is not defined.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:24 -07:00
Xenia Ragiadakou ea1751438a staging: rtl8192u: remove code inside #ifdef RTL8190P/RTL8192E in r819xU_phy.c
This patch removes the unused code inside #ifdef RTL8190P and #ifdef RTL8192E
guards since RTL8190P and RTL8192E are not defined.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:24 -07:00
Xenia Ragiadakou dd747fa582 staging: rtl8192u: remove unused dm_gpio_change_rf_callback()
This patch removes dm_gpio_change_rf_callback() because it is not called
anywhere and it resides inside an #ifdef RTL8192E guard while RTL8192E
is not defined.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:23 -07:00
Xenia Ragiadakou 1e27ab87d1 staging: rtl8192u: remove #ifdef RTL8192U guard in r8192U_dm.c
This patch removes #ifdef RTL8192U header guards from r8192U_dm.c, since
RTL8192U is defined in the included r8192U.h header.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:23 -07:00
Xenia Ragiadakou 95b672bbf7 staging: rtl8192u: remove dm_check_rfctrl_gpio()
This patch removes dm_check_rfctrl_gpio() because it does nothing when
RTL8192U is defined.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:23 -07:00
Xenia Ragiadakou f8518efa4e staging: rtl8192u: check dev_alloc_skb() return value in fw_download_code()
This patch adds a check whether skb allocation, in fw_download_code(), was
successful.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:23 -07:00
Xenia Ragiadakou ccb0ec8338 staging: rtl8192u: remove unused code in fw_download_code()
This patch removes the code that resides outside #ifdef RTL8192U,
since RTL8192U is defined in r8192U.h and removes, also, the header
guard itself.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:23 -07:00
Xenia Ragiadakou f6150b40e9 staging: rtl8192u: remove cmpk_message_handle_tx()
The function cmpk_message_handle_tx() is called only in r8192U_dm.c in two
places. The first call resides outside an #ifdef RTL8192U guard, and since
RTL8192U is defined this call can be removed. At the other site this function
is called, there is no check on its return value. Since cmpk_message_handle_tx()
does not do anything else other than returning true, it can be safely removed.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:23 -07:00
Xenia Ragiadakou f7e9fbc017 staging: rtl8192u: remove unused code from cmpk_message_handle_tx()
The file r819xU_cmdpkt.c includes header r8192U.h which defines RTL8192U.
This patch removes from cmpk_message_handle_tx() the part of the code that
is never used because it resides outside the header guard #ifdef RTL8192U.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:22 -07:00
Andrea Merello 559a4c318c staging: Update e-mail address for Andrea Merello
A lot of files contain reference to my old e-mail address.
Now I'm going not to read mail from it anymore, so update it
with my current address everywhere.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 22:03:53 -07:00
Li Zefan e8e6fda00b Staging: rtl8192u/ieee80211: add missing single_release()
The debug file is opened with single_open(), but there's no
single_release().

Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31 17:33:36 -07:00
Xenia Ragiadakou bdc7cb1994 staging: rtl8192u: remove unused macros r819xU_cmdpkt.c
This patch removes CMPK_DEBOUNCE_CNT and CMPK_PRINT()
because they are not used anywhere in the driver.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 14:47:28 -07:00
Xenia Ragiadakou f70edb9f1c staging: rtl8192u: fix line size and identation in r819xU_cmdpkt.c
This patch limits the line size below 80 characters, when
possible, and fixes identation to meet kernel coding style
convetions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 14:47:28 -07:00
Xenia Ragiadakou bdcd57fa21 staging: rtl8192u: remove unnecessary line continuations in r819xU_cmdpkt.c
This patch fixes the following checkpatch warning:
WARNING: Avoid unnecessary line continuations

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 14:47:28 -07:00
Xenia Ragiadakou 6df9f669de staging: rtl8192u: fix comments in r819xU_cmdpkt.c
This patches fixes comments by:
- replacing // comments with /**/ comments
- removing unnecessary comments (trailing comments
  with the function name, comments stating date/author
  when they are placed inside the function definition)
- fixing internal alignment

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 14:47:28 -07:00
Xenia Ragiadakou fa6b108bb1 staging: rtl8192u: fix whitespace in r819xU_cmdpkt.c
This patch fixes whitespaces in r819xU_cmdpkt.c to
follow the kernel coding style and to improve code
readability.

It fixes the spaces around <,=||&&();} and adds or
removes tabs to better align variables.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 14:47:27 -07:00
Xenia Ragiadakou 05cdf47ac3 staging: rtl8192u: fix braces in r819xU_cmdpkt.c
This patch fixes the brace position according to the
linux kernel coding style and removes unnecessary braces.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 14:47:27 -07:00
Xenia Ragiadakou f2a04351ed staging: rtl8192u: remove commented-out code in r819xU_cmdpkt.c
This patch removes commented-out code and the comments
that refer to it to facilitate code review.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 14:47:27 -07:00
Linus Torvalds 496322bc91 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
 "This is a re-do of the net-next pull request for the current merge
  window.  The only difference from the one I made the other day is that
  this has Eliezer's interface renames and the timeout handling changes
  made based upon your feedback, as well as a few bug fixes that have
  trickeled in.

  Highlights:

   1) Low latency device polling, eliminating the cost of interrupt
      handling and context switches.  Allows direct polling of a network
      device from socket operations, such as recvmsg() and poll().

      Currently ixgbe, mlx4, and bnx2x support this feature.

      Full high level description, performance numbers, and design in
      commit 0a4db187a9 ("Merge branch 'll_poll'")

      From Eliezer Tamir.

   2) With the routing cache removed, ip_check_mc_rcu() gets exercised
      more than ever before in the case where we have lots of multicast
      addresses.  Use a hash table instead of a simple linked list, from
      Eric Dumazet.

   3) Add driver for Atheros CQA98xx 802.11ac wireless devices, from
      Bartosz Markowski, Janusz Dziedzic, Kalle Valo, Marek Kwaczynski,
      Marek Puzyniak, Michal Kazior, and Sujith Manoharan.

   4) Support reporting the TUN device persist flag to userspace, from
      Pavel Emelyanov.

   5) Allow controlling network device VF link state using netlink, from
      Rony Efraim.

   6) Support GRE tunneling in openvswitch, from Pravin B Shelar.

   7) Adjust SOCK_MIN_RCVBUF and SOCK_MIN_SNDBUF for modern times, from
      Daniel Borkmann and Eric Dumazet.

   8) Allow controlling of TCP quickack behavior on a per-route basis,
      from Cong Wang.

   9) Several bug fixes and improvements to vxlan from Stephen
      Hemminger, Pravin B Shelar, and Mike Rapoport.  In particular,
      support receiving on multiple UDP ports.

  10) Major cleanups, particular in the area of debugging and cookie
      lifetime handline, to the SCTP protocol code.  From Daniel
      Borkmann.

  11) Allow packets to cross network namespaces when traversing tunnel
      devices.  From Nicolas Dichtel.

  12) Allow monitoring netlink traffic via AF_PACKET sockets, in a
      manner akin to how we monitor real network traffic via ptype_all.
      From Daniel Borkmann.

  13) Several bug fixes and improvements for the new alx device driver,
      from Johannes Berg.

  14) Fix scalability issues in the netem packet scheduler's time queue,
      by using an rbtree.  From Eric Dumazet.

  15) Several bug fixes in TCP loss recovery handling, from Yuchung
      Cheng.

  16) Add support for GSO segmentation of MPLS packets, from Simon
      Horman.

  17) Make network notifiers have a real data type for the opaque
      pointer that's passed into them.  Use this to properly handle
      network device flag changes in arp_netdev_event().  From Jiri
      Pirko and Timo Teräs.

  18) Convert several drivers over to module_pci_driver(), from Peter
      Huewe.

  19) tcp_fixup_rcvbuf() can loop 500 times over loopback, just use a
      O(1) calculation instead.  From Eric Dumazet.

  20) Support setting of explicit tunnel peer addresses in ipv6, just
      like ipv4.  From Nicolas Dichtel.

  21) Protect x86 BPF JIT against spraying attacks, from Eric Dumazet.

  22) Prevent a single high rate flow from overruning an individual cpu
      during RX packet processing via selective flow shedding.  From
      Willem de Bruijn.

  23) Don't use spinlocks in TCP md5 signing fast paths, from Eric
      Dumazet.

  24) Don't just drop GSO packets which are above the TBF scheduler's
      burst limit, chop them up so they are in-bounds instead.  Also
      from Eric Dumazet.

  25) VLAN offloads are missed when configured on top of a bridge, fix
      from Vlad Yasevich.

  26) Support IPV6 in ping sockets.  From Lorenzo Colitti.

  27) Receive flow steering targets should be updated at poll() time
      too, from David Majnemer.

  28) Fix several corner case regressions in PMTU/redirect handling due
      to the routing cache removal, from Timo Teräs.

  29) We have to be mindful of ipv4 mapped ipv6 sockets in
      upd_v6_push_pending_frames().  From Hannes Frederic Sowa.

  30) Fix L2TP sequence number handling bugs, from James Chapman."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1214 commits)
  drivers/net: caif: fix wrong rtnl_is_locked() usage
  drivers/net: enic: release rtnl_lock on error-path
  vhost-net: fix use-after-free in vhost_net_flush
  net: mv643xx_eth: do not use port number as platform device id
  net: sctp: confirm route during forward progress
  virtio_net: fix race in RX VQ processing
  virtio: support unlocked queue poll
  net/cadence/macb: fix bug/typo in extracting gem_irq_read_clear bit
  Documentation: Fix references to defunct linux-net@vger.kernel.org
  net/fs: change busy poll time accounting
  net: rename low latency sockets functions to busy poll
  bridge: fix some kernel warning in multicast timer
  sfc: Fix memory leak when discarding scattered packets
  sit: fix tunnel update via netlink
  dt:net:stmmac: Add dt specific phy reset callback support.
  dt:net:stmmac: Add support to dwmac version 3.610 and 3.710
  dt:net:stmmac: Allocate platform data only if its NULL.
  net:stmmac: fix memleak in the open method
  ipv6: rt6_check_neigh should successfully verify neigh if no NUD information are available
  net: ipv6: fix wrong ping_v6_sendmsg return value
  ...
2013-07-09 18:24:39 -07:00
Xenia Ragiadakou 59f30ae02c staging: rtl8192u: fix line length in r819xU_phy.h
This patch fixes the following checkpatch warning:
WARNING: line over 80 characters

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24 16:44:59 -07:00
Xenia Ragiadakou a029ccae0a staging: rtl8192u: rename variables in r819xU_phy.h
This patch renames the variables that were renamed in
r819xU_phy.c to preserve consistency between the two.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24 16:44:59 -07:00
Xenia Ragiadakou 2703d1b15b staging: rtl8192u: fix comments in r819xU_phy.h
This patch fixes the comments by:
- changing them to follow the kernel coding style
- removing commented-out code
- removing comments that refer developer's name

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24 16:44:59 -07:00
Xenia Ragiadakou 19e918f0a7 staging: rtl8192u: fix whitespace in r819xU_phy.h
This patch fixes the whitespace around braces
to follow the linux kernel coding style and
removes some tabs to better align struct fields.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24 16:44:59 -07:00
Xenia Ragiadakou 0081fcc646 staging: rtl8192u: fix newlines in r819xU_phy.c
This patch fixes the newlines by:
- adding a newline after variables declarations.
- removing the newlines following the return statement.
- removing the newlines between function header comments
  and function definitions.
- adding one newline between function definitions.
- adding a newline at the end of RT_TRACE messages.

This was done to improve code's and logmessages'
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24 16:44:59 -07:00
Xenia Ragiadakou 26f3561db7 staging: rtl8192u: replace msleep(1) with usleep_range() in r819xU_phy.c
This patch fixes the following checkpatch warning:
WARNING: msleep < 20ms can sleep for up to 20ms

The implementation of msleep() is based on jiffies timeout
subsystem. Hence, its resolution is constrained by the value
of HZ tick rate. When HZ variable is configured to 100,
the jiffies variable is updated every 10 ms, so a timeout
of 1ms cannot be met using jiffies (it will be rounded up
to 10ms).

This patch replaces msleep(1) with usleep_range(1000, 1000).
usleep_range() uses hrtimers subsystem which is not bound
to HZ value and can provide microsecond-level resolution.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24 16:08:33 -07:00
Xenia Ragiadakou a60d4d6896 staging: rtl8192u: rename dwRegRead and rtStatus in r819xU_phy.c
This patch renames the following variables:
'dwRegRead' into 'reg'
'rtStatus'  into 'status'

This is done primarily to reduce line length below 80 chars,
since the size and the usage of dwRegRead variable
can be deduced by its type and the function called
to assign it, so it can be replaced by simply 'reg'.
Also, rtStatus is not more informative than just status
in the given context.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24 16:08:33 -07:00
Xenia Ragiadakou 08a4cdea19 staging: rtl8192u: replace __FUNCTION__ in r819xU_phy.c
This patch fixes the following checkpatch warning:
WARNING: __func__ should be used instead of gcc specific __FUNCTION__

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24 16:08:33 -07:00
Xenia Ragiadakou 1db5aa0562 staging: rtl8192u: limit line size in r819xU_phy.c
This patch limits the line size below 80 characters,
when possible without producing new checkpatch errors.

This is done by adjusting identation, replacing hardcoded
function names in messages with __func__, merging some
trailing comments with the header comments when they both
refer to the same line and removing some unnecessary
parenthesis.

Also, changes slightly some RT_TRACE messages to make
them shorter without altering their content.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24 16:08:32 -07:00
Xenia Ragiadakou 5f2392b865 staging: rtl8192u: fix comments in r819xU_phy.c
This patch fixes the comments in r819xU_phy.c by:
- replacing "// ..." with "/* .... */"
- removing unnecessary comments, the dates and names of
  developers from comments
- fixing some inconsistent comments
- fixing some typos
- fixing alignment issues

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-19 09:41:40 -07:00
Xenia Ragiadakou 83e6d9e262 staging: rtl8192u: fix spaces around ',' in r819xU_phy.c
This patch fixes the whitespace around ',' to meet the
linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-19 09:41:40 -07:00
Xenia Ragiadakou c4b5eb8c01 staging: rtl8192u: remove variable 'Ret' in r819xU_phy.c
This patch removes variable 'Ret' from rtl8192_QueryBBReg()
since its value is returned immediately after it is
assigned. The name 'Ret', anyway, does not give any
insight and the function description comment is sufficiently
informative regarding the returned value.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-19 09:41:39 -07:00
Xenia Ragiadakou 7993163901 staging: rtl8192u: rename general variables in r819xU_phy.c
This patch renames the following variables:
- dwRegAddr and RegAddr into reg_addr
- dwData and Data       into data
- BitShift              into bitshift
- Offset                into offset
- NewOffset             into new_offset
- Bandwidth             into bandwidth

The renaming was done to remove camel case and
unnecessary 'dw' prefix from the above variable names.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:32:39 -07:00
Xenia Ragiadakou 9f66ddb5f7 staging: rtl8192u: rename *BitMask variables in r819xU_phy.c
This patch renames BitMask and dwBitMask variables into
bitmask to remove camel case.
dwBitMask in the given context can be renamed into simply
bitmask since its number of bits (dw->32) can be deduced
by its type which is u32.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:32:39 -07:00
Xenia Ragiadakou 07ecbbf1a3 staging: rtl8192u: replace *Value variables in r819xU_phy.c
This patch renames the variables OriginalValue, NewValue,
Original_Value, New_Value and retValue to reg, and
the variables bRegValue and dwRegValue to reg_u8 and
reg_u32, respectively. This is done primarily in
order to reduce the variable name length and consequently
line length.

Also, it replaces the pair of Original and New variables
with one variable.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:32:39 -07:00
Xenia Ragiadakou 9d8e79ed32 staging: rtl8192u: fix spaces around relational operators in r819xU_phy.c
This patch fixes the whitespace around relational operators
to meet the linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:32:39 -07:00
Xenia Ragiadakou 111857c983 staging: rtl8192u: fix spaces around ';' in r819xU_phy.c
This patch fixes the whitespace around ';' to meet the
linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:32:38 -07:00
Xenia Ragiadakou ec5d319bbf staging: rtl8192u: fix spaces around '=' in r819xU_phy.c
This patch fixes the whitespace around the assignment
operator to meet linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:32:38 -07:00
Dave Jones 0c29359252 staging/rtl8192u: remove commented out __list_for_each usage
Also remove another commented out open-coded list manipulation while we're there.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:22:58 -07:00
Isaku Yamahata a267a6041f staging/rtl8192u: convert skb->tail into skb_tail_pointer(skb)
The change set of 7a884dc "[SK_BUFF]: Convert skb->tail to sk_buff_data_t"
converted skb->tail from pointer into sk_buff_data_t.
Thus skb->tail is not always pointer, the area pointed by skb->tail
should be accessed via skb_tail_pointer().

Found by inspection. Compile tested only.

Cc: Simon Horman <horms@verge.net.au>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Reviewed-by: Simon Horman <horms@verge.net.au>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-17 17:12:21 -07:00
Xenia Ragiadakou 442543d78c staging: rtl8192u: fix function arguments position in r819xU_phy.c
This patch fixes the alignment of function arguments to make
it uniform across the driver trying to keep the line size
below 80 characters.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:44 -07:00
Xenia Ragiadakou ceb5659758 staging: rtl8192u: fix spaces around ( and ) in r819xU_phy.c
This patch removes whitespace after ')' and before ')'
following the linux kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:44 -07:00
Xenia Ragiadakou d75340eb05 staging: rtl8192u: remove commented-out code in r819xU_phy.c
This patch removes commented-out code to improve code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:44 -07:00
Xenia Ragiadakou eadb188c78 staging: rtl8192u: fix spaces around for and while in r819xU_phy.c
This patch fixes whitespace around 'for' and 'while'
following the linux kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:44 -07:00
Xenia Ragiadakou 1111b8769a staging: rtl8192u: fix spaces around 'if' in r819xU_phy.c
This patch fixes whitepace around 'if' following the linux
kernel coding style convention.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:44 -07:00
Xenia Ragiadakou 4c8dd92620 staging: rtl8192u: fix return statements in r819xU_phy.c
This patch fixes the following checkpatch error:
ERROR: return is not a function, parentheses are not required

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:43 -07:00
Xenia Ragiadakou 4a6094c317 staging: rtl8192u: fix braces in r819xU_phy.c
This patch fixes the brace position and the whitespace
around braces.

That corrects the following checkpatch errors:
ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'
ERROR: space required after that close brace '}'

Also, it removes completely an if(0) statement,
instead of correcting its braces.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:43 -07:00
Xenia Ragiadakou 391c72a30b staging: rtl8192u: fix bitshift calculation in r819xU_phy.c
This patch uses the ffs linux built-in routine in the
computation of the bitshift to take advantage of
architecture specific instructions that implement this
computation more efficiently.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:43 -07:00
Xenia Ragiadakou 4a8d113554 staging: rtl8192u: fix macros in r8192U.h
This patch fixes the macros in r8192U.h.
More specifically:

1) removes the ';' from the end of the macro definition
   and changes according the files that are affected by
   this change by adding ';' at the end of the macro call
2) replaces printk with pr_debug, when applicable
3) replaces __FUNCTION__ with __func__
4) fixes the framing when the macro contains complex expressions
5) renames macro 'assert' as 'RTL9192U_ASSERT', so that it
   cannot be confused with the c function assert(), and changes
   accordingly the files affected by this change

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-11 17:18:04 -07:00
Xenia Ragiadakou 631edcdc45 staging: rtl8192u: fix whitespace around '(=<, ' in r8192U.h
This parch fixes the following checkpatch errors:
ERROR: space required before the open parenthesis '('
ERROR: spaces required around that '='
ERROR: spaces required around that '<'
ERROR: space required after that ','

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-11 17:18:03 -07:00
Xenia Ragiadakou 2da4fc24f5 staging: rtl8192u: fix braces in r8192U.h
This patch fixes the whitespace around braces and brace
position, and corrects the following checkpatch errors:
ERROR: space required after that close brace '}'
ERROR: space required before the open brace '{'
ERROR: that open brace { should be on the previous line
ERROR: open brace '{' following enum go on the same line

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-11 17:18:03 -07:00
Xenia Ragiadakou 4e0be66853 staging: rtl8192u: fix comments in r8192U.h
This patch fixes the comments in r8192U.h by:

1) replacing '// ... ' comments with '/* ... */' comments
2) removing from the comments the date and the developer's name
3) removing unnecessary comments when variables naming is
   descriptive enough

Also, it fixes some typos found in the comments and arranges
the comments placement and content aiming to improve code
readability and to limit line length below 80 chars, without
loosing the comment's substance.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-11 17:18:02 -07:00
Xenia Ragiadakou 93a8265290 staging: rtl8192u: remove commented-out code in r8192U.h
This patch removes commented-out code to improve code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-11 17:18:01 -07:00
Xenia Ragiadakou b3d42bf187 staging: rtl8192u: fix read_nic_* functions
read_nic_*() functions are defined in r8192U_core.c.
They call internally usb_control_msg() to read the
nic registers and return the value read.
Following a remark made by Dan Carpenter, if usb_control_msg()
fails, the value returned will be invalid.

To accommodate for this, this patch changes the functions
to take a pointer as argument to set the value read and
return 0 on success and the error status on failure, so
that callers of read_nic_*() can check the return status.

Some other fixes introduced in read_nic_*() functions are:

The expressions (1<<EPROM_*_SHIFT) used to address and set
the individual bits of the eeprom register were replaced
with EPROM_*_BIT bitmasks to make the code more intuitive.
EPROM_*_BIT bitmasks were defined in r8192U_hw.h and
EPROM_*_SHIFT were removed.

In netdev_err(), which is called in case of failure,
the hardcoded function name in the error log message was
replaced with __func__ to reduce line size.
Also, from the error log message, it was omitted the word
"Timeout" and it is just reported the error code since the
failure can not only be due to timeout expiration but also
due to a memory allocation failure. In case of timeout
expiration, usb_start_wait_urb() prints an appropriate log
message when debug is enabled.

Finally, some minor fixes to the coding style were applied in
lines affected by the above changes, including the removal
of ifdef DEBUG_RX (the debugging of reads and writes of the
nic registers shall be done with explicit check on their
return status which will be added in a follow on patch).

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-06 11:57:16 -07:00
Dan Carpenter c2ac90b9b4 Staging: rtl8192u: fix a reversed test
Sean MacLennan fixed this in the rtl8192e driver and we should fix
it here as well.

It's pretty harmless.  This information comes from the firmware, if
we were to hit this bug we would read beyond the end of the array
once or twice before returning and update our statistics with bogus
data.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-06 11:57:15 -07:00
Xenia Ragiadakou f2c3d80097 staging: rtl8192u: replace macro rx_hal_is_cck_rate() in r8192U_core.c
This patch replaces macro rx_hal_is_cck_rate() with
the static inline function rx_hal_is_cck_rate().

This replacement was suggested by Dan Carpenter and
has the following benefits:
- improves code readability
- guarantees type safety
- improves code efficiency by enforcing the evaluation of
  the simple boolean expression (!pdrvinfo->RxHT) to be
  done before the evaluation of the more complex one
  (pdrvinfo->RxRate == DESC90_RATE1M ||
   pdrvinfo->RxRate == DESC90_RATE2M ||
   pdrvinfo->RxRate == DESC90_RATE5_5M ||
   pdrvinfo->RxRate == DESC90_RATE11M)

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-05 15:37:22 -07:00
Xenia Ragiadakou 88e5a934d3 staging: rtl8192u: remove trailing whitespace in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: trailing whitespace

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-05 15:37:22 -07:00
Xenia Ragiadakou 7d79ec6906 staging: rtl8192u: remove space before '++' in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: space prohibited before that '++'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-05 15:37:22 -07:00
Xenia Ragiadakou 003a2d18d7 staging: rtl8192u: remove space after reference '&' in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: space prohibited after that '&'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-05 15:37:21 -07:00
Xenia Ragiadakou 15f6d3a493 staging: rtl8192u: add spaces around ?:&&|| in r8192U_core.c
This patch fixes the following checkpatch errors:
ERROR: spaces required around that '?'
ERROR: spaces required around that ':'
ERROR: spaces required around that '&&'
ERROR: spaces required around that '||'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-05 15:37:21 -07:00
Xenia Ragiadakou 2c7c0c347c staging: rtl8192u: fix return statements in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: return is not a function, parentheses are not required

Also, fixes the spaces in return statements to
improve code readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-05 15:37:21 -07:00
Xenia Ragiadakou b1753c43b0 staging: rtl8192u: fix spaces in array indexing in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: space prohibited before open square bracket '['

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-05 15:37:21 -07:00
Xenia Ragiadakou 8f896d61dd staging: rtl8192u: fix identation in r8192U_core.c
This patch fixes identation and alignment in r8192U_core.c.
Also, removes spaces from idents when applicable.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-04 19:33:52 -07:00
Xenia Ragiadakou f0a60a147e staging: rtl8192u: remove unnecessary line continuations in r8192U_core.c
This patch fixes the following checkpatch warning:
WARNING: Avoid unnecessary line continuations

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-04 19:33:52 -07:00
Xenia Ragiadakou 70bdf8a2c5 staging: rtl8192u: fix function definitions' style in r8192U_core.c
This patch fixes the function definitions' style in order
to be uniform across the file and in compliance with the
linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-04 19:33:51 -07:00
Xenia Ragiadakou 2716141cd2 staging: rtl8192u: fix braces in r8192U_core.c
This patch fixes the position of braces and removes
redundant braces, following the kernel coding style
conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-04 19:33:50 -07:00
Xenia Ragiadakou 57c259fb6e staging: rtl8192u: remove dead and commented-out code in r8192U_core.c
This cleanup patch removes commented-out code and
the functions rtl8192_dump_reg() and print_buffer()
which are not called anywhere in the driver.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-04 19:33:49 -07:00
Xenia Ragiadakou d6bbce0642 rtl8192u: fix printk calls in r8192U_core.c
This patch replaces calls to printk with their
corresponding calls to pr_<loglevel>(fmt, ...)
and netdev_<loglevel>(dev, fmt, ...), when it
is applicable, to make the log messages more
informative.

Also, it fixes some small typos and whitespaces
found in log messages.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:06:26 +09:00
Xenia Ragiadakou 972ff92fc5 rtl8192u: add space after '}' in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: space required after that close brace '}'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 19:28:19 -07:00
Xenia Ragiadakou 5b3b215b62 rtl8192u: replace __FUNCTION__ with __func__ in r8192U_core.c
This patch fixes the following checkpatch warning:
WARNING: __func__ should be used instead of gcc
specific __FUNCTION__

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 19:28:17 -07:00
Xenia Ragiadakou e636721fd2 rtl8192u: remove space between function name and '(' in r8192U_core.c
This patch fixes the following checkpatch warning:
WARNING: space prohibited between function name and
open parenthesis '('

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 19:28:17 -07:00
Xenia Ragiadakou 3ab31c7bc5 rtl8192u: fix whitespace around ',' in r8192U_core.c
This patch fixes whitespace around ',' and corrects
the following checkpatch error:
ERROR: space required after that ','

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:34:33 -07:00
Xenia Ragiadakou 9f6bd88daf rtl8192u: fix whitespace after '(' and before ')' in r8192U_core.c
This patch removes whitespace after '(' and before ')'
following the kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:34:32 -07:00
Xenia Ragiadakou 3db3764625 rtl8192u: fix whitespace around ';' in r8192U_core.c
This patch fixes whitespace around ';' following kernel
coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:34:32 -07:00
Xenia Ragiadakou 204ecd3930 rtl8192u: fix whitespace around relational operators in r8192U_core.c
This patch fixes whitespace around relational operators
following the kernel coding style conventions.
It corrects the following checkpatch errors:
ERROR: spaces required around that '=='
ERROR: spaces required around that '!'
ERROR: spaces required around that '<='
ERROR: spaces required around that '>='
ERROR: spaces required around that '<'
ERROR: spaces required around that '>'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:34:32 -07:00
Xenia Ragiadakou 2d39b00292 rtl8192u: fix whitespace around '=' in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: spaces required around that '='

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:34:32 -07:00
Xenia Ragiadakou 53c7f3cdba rtl8192u: fix whitespace around 'while' in r8192U_core.c
This patch fixes whitespace around 'while' following
the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:34:32 -07:00
Xenia Ragiadakou 212bff38c9 rtl8192u: fix whitespace around 'for' in r8192U_core.c
This patch fixes whitespace around 'for' following the
kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:34:32 -07:00
Xenia Ragiadakou 34fc438a09 rtl8192u: fix whitespace around 'if' in r8192U_core.c
This patch fixes whitespace around 'if' following the
kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:33:14 -07:00
Xenia Ragiadakou 0009631bc2 rtl8192u: remove whitespace after '(' and before ')' in r8192U_dm.c
This patch fixes the following checkpatch errors, in r8192U_dm.c:
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:45:53 -07:00
Xenia Ragiadakou 66fe11cf00 rtl8192u: remove whitespace after '(' and before ')' in r8192U.h
This patch fixes the following checkpatch errors:
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:45:51 -07:00
Xenia Ragiadakou 9948cade1d rtl8192u: remove whitespace after '(' and before ')' in r8190_rtl8256.c
This patch fixes the following checkpatch errors, in r8190_rtl8256.c:
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:45:51 -07:00
Xenia Ragiadakou 33c2aa14a8 rtl8192u: fix whitespace around ~ in r8192U_dm.c
This patch fixes the following checkpatch error:
ERROR: space prohibited after that '~'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:44:50 -07:00
Xenia Ragiadakou 4b150936ea rtl8192u: fix whitespace around ~ in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: space prohibited after that '~'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:44:49 -07:00
Xenia Ragiadakou f97c26c0b0 rtl8192u: fix whitespace around ~ in r8180_93cx6.c
This patch fixes the whitespace around ~ and corrects the
following checkpatch error:
ERROR: space prohibited after that '~'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:44:49 -07:00
Xenia Ragiadakou 14bc0d4f07 rtl8192u: fix whitespace around if statements in r819xU_firmware.c
This patch fixes a part of the following checkpatch error:
ERROR: space required before the open parenthesis '('
by adding space after if

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:43:34 -07:00
Xenia Ragiadakou a71d7679d7 rtl8192u: fix whitespace around if statements in r819xU_cmdpkt.c
This patch fixes a part of the following checkpatch error:
ERROR: space required before the open parenthesis '('
by adding space after if

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:43:33 -07:00
Xenia Ragiadakou 0962f96441 rtl8192u: fix whitespace around if statements in r8192U.h
This patch fixes a part of the following checkpatch error:
ERROR: space required before the open parenthesis '('
by adding space after if

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:43:26 -07:00
Xenia Ragiadakou fcd9f3596c rtl8192u: fix whitespace around if statements in r8180_93cx6.c
This patch fixes a part of the following checkpatch error:
ERROR: space required before the open parenthesis '('
by adding space after if

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:43:10 -07:00
Xenia Ragiadakou ad6384591f STAGING: rtl8192u: fix checkpatch error by adding space after switch
This patch fixes the following checkpatch error:
ERROR: space required before the open parenthesis '('

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:17:58 -07:00
Xenia Ragiadakou 3c19fbb6d3 STAGING: rtl8192u/ieee80211: fix checkpatch error about pointer position in tl819x_TSProc.c
This patch fixes the pointer position in tl819x_TSProc.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:16:20 -07:00
Xenia Ragiadakou 2abe5a7a6e STAGING: rtl8192u/ieee80211: fix checkpatch error about pointer position in rtl819x_Qos.h
This patch fixes the pointer position in rtl819x_Qos.h
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:16:19 -07:00
Xenia Ragiadakou 2b16648c38 STAGING: rtl8192u/ieee80211: fix checkpatch error about pointer position in rtl819x_HTProc.c
This patch fixes the pointer position in rtl819x_HTProc.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:16:19 -07:00
Xenia Ragiadakou 0af6c0cb64 STAGING: rtl8192u/ieee80211: fix checkpatch error about pointer position in rtl819x_BAProc.c
This patch fixes the pointer position in rtl819x_BAProc.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:16:18 -07:00
Xenia Ragiadakou 5d279df167 STAGING: rtl8192u/ieee80211: fix checkpatch error about pointer position in dot11d
This patch fixes the pointer position in dot11d.h and dot11d.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:14:52 -07:00
Xenia Ragiadakou bdedc7504e STAGING: rtl8192u/ieee80211: fix checkpatch error about pointer position in ieee80211_tx.c
This patch fixes the pointer position in ieee80211_tx.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:14:51 -07:00
Xenia Ragiadakou 2639ae97a7 STAGING: rtl8192u/ieee80211: fix checkpatch error about pointer position in ieee80211_softmac.c
This patch fixes the pointer position in ieee80211_softmac.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:14:51 -07:00
Xenia Ragiadakou ea77527a45 STAGING: rtl8192u/ieee80211: fix checkpatch error about pointer position in ieee80211_rx.c
This patch fixes the pointer position in ieee80211_rx.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:14:51 -07:00
Xenia Ragiadakou f8bfab9e82 STAGING: rtl8192u/ieee80211: fix checkpatch error about pointer position in ieee80211_crypt_wep.c
This patch fixes the pointer position in ieee80211_crypt_wep.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:14:50 -07:00
Xenia Ragiadakou 8acfd58a4d STAGING: rtl8192u/ieee80211: fix checkpatch error about pointer position in ieee80211_crypt_tkip.c
This patch fixes the pointer position in ieee80211_crypt_tkip.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:14:50 -07:00
Xenia Ragiadakou 6560d4b9bc STAGING: rtl8192u/ieee80211: fix checkpatch error about pointer position in ieee80211_crypt_ccmp.c
This patch fixes the pointer position in ieee80211_crypt_ccmp.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:14:49 -07:00
Xenia Ragiadakou ff0d38cc10 STAGING: rtl8192u/ieee80211: fix checkpatch error about pointer position in ieee80211_crypt
This patch fixes the pointer position in ieee80211_crypt.h and
ieee80211_crypt.c to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:14:49 -07:00
Xenia Ragiadakou 347a890d5d STAGING: rtl8192u/ieee20811: fix checkpatch error about pointer position in ieee20811.h
This patch fixes the pointer position in ieee20811.h
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:14:48 -07:00
Xenia Ragiadakou e9082794cc STAGING: rtl8192u: fix checkpatch error about pointer position in r8192U.h
This patch fixes the pointer position in r8192U.h
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:11:50 -07:00
Xenia Ragiadakou b81c2b0a33 STAGING: rtl8192u: fix checkpatch error about pointer position in r8192U_wx.c
This patch fixes the pointer position in r8192U_wx.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:11:49 -07:00
Xenia Ragiadakou 959674e3bd STAGING: rtl8192u: fix checkpatch error about pointer position in r8190_rtl8256
This patch fixes the pointer position in r8190_rtl8256.h and r8190_rtl8256.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:11:48 -07:00
Xenia Ragiadakou 88d8fe2943 STAGING: rtl8192u: fix checkpatch error about pointer position in r819xU_phy
This patch fixes the pointer position in r819xU_phy.h and r819xU_phy.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:11:48 -07:00
Xenia Ragiadakou 12fbccbe18 STAGING: rtl8192u: fix checkpatch error about pointer position in r819xU_firmware.c
This patch fixes the pointer position in r819xU_firmware.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:11:48 -07:00
Xenia Ragiadakou 9772acad08 STAGING: rtl8192u: fix checkpatch error about pointer position in r819xU_cmdpkt
This patch fixes the pointer position in r819xU_cmdpkt.h and r819xU_cmdpkt.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:11:47 -07:00
Xenia Ragiadakou 999d594b78 STAGING: rtl8192u: fix checkpatch error about pointer position in r8192U_dm.c
This patch fixes the pointer position in r8192U_dm.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-12 08:42:50 -07:00
Xenia Ragiadakou 9f7b830033 STAGING: rtl8192u: fix checkpatch error about pointer position in r8192U_core.c
This patch fixes the pointer position in r8192U_core.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-12 08:42:50 -07:00
Al Viro bae301d346 staging: single_open() leaks
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-05 00:15:43 -04:00
Linus Torvalds 20b4fb4852 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS updates from Al Viro,

Misc cleanups all over the place, mainly wrt /proc interfaces (switch
create_proc_entry to proc_create(), get rid of the deprecated
create_proc_read_entry() in favor of using proc_create_data() and
seq_file etc).

7kloc removed.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
  don't bother with deferred freeing of fdtables
  proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
  proc: Make the PROC_I() and PDE() macros internal to procfs
  proc: Supply a function to remove a proc entry by PDE
  take cgroup_open() and cpuset_open() to fs/proc/base.c
  ppc: Clean up scanlog
  ppc: Clean up rtas_flash driver somewhat
  hostap: proc: Use remove_proc_subtree()
  drm: proc: Use remove_proc_subtree()
  drm: proc: Use minor->index to label things, not PDE->name
  drm: Constify drm_proc_list[]
  zoran: Don't print proc_dir_entry data in debug
  reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
  proc: Supply an accessor for getting the data from a PDE's parent
  airo: Use remove_proc_subtree()
  rtl8192u: Don't need to save device proc dir PDE
  rtl8187se: Use a dir under /proc/net/r8180/
  proc: Add proc_mkdir_data()
  proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
  proc: Move PDE_NET() to fs/proc/proc_net.c
  ...
2013-05-01 17:51:54 -07:00
David Howells 4a520d2769 proc: Supply an accessor for getting the data from a PDE's parent
Supply an accessor function for getting the private data from the parent
proc_dir_entry struct of the proc_dir_entry struct associated with an inode.

ReiserFS, for instance, stores the super_block pointer in the proc directory
it makes for that super_block, and a pointer to the respective seq_file show
function in each of the proc files in that directory.

This allows a reduction in the number of file_operations structs, open
functions and seq_operations structs required.  The problem otherwise is that
each show function requires two pieces of data but only has storage for one
per PDE (and this has no release function).

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Jerry Chuang <jerry-chuang@realtek.com>
cc: Maxim Mikityanskiy <maxtram95@gmail.com>
cc: YAMANE Toshiaki <yamanetoshi@gmail.com>
cc: linux-wireless@vger.kernel.org
cc: linux-scsi@vger.kernel.org
cc: devel@driverdev.osuosl.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-01 17:29:42 -04:00
David Howells cc87e0fff1 rtl8192u: Don't need to save device proc dir PDE
Don't need to save the PDE of a directory created under /proc/net/rtl8192/ as
we can use proc subtree deletion to get rid of it and all its children.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Jerry Chuang <jerry-chuang@realtek.com>
cc: linux-wireless@vger.kernel.org
cc: devel@driverdev.osuosl.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-01 17:29:41 -04:00
David Howells 270b5ac215 proc: Add proc_mkdir_data()
Add proc_mkdir_data() to allow procfs directories to be created that are
annotated at the time of creation with private data rather than doing this
post-creation.  This means no access is then required to the proc_dir_entry
struct to set this.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Neela Syam Kolli <megaraidlinux@lsi.com>
cc: Jerry Chuang <jerry-chuang@realtek.com>
cc: linux-scsi@vger.kernel.org
cc: devel@driverdev.osuosl.org
cc: linux-wireless@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-01 17:29:41 -04:00
David Howells 0541f9d08a rtl8192u: Don't use create_proc_read_entry()
Don't use create_proc_read_entry() as that is deprecated, but rather use
proc_create_data() and seq_file instead.  Whilst we're at it, reduce the
number of show functions where we can share them.

Note: proc_get_stats_ap() should probably use seq_file iteration rather than
list_for_each_entry().

Further note: There appears to be a lot of locking missing in this file to
defend against concurrent access by the driver doing normal operations.
Notably, ieee->network_list traversal and RWCAM/RCAMO command/response access.
Further, do any of the registers read have side effects upon reading?

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jerry Chuang <jerry-chuang@realtek.com>
cc: Mauro Carvalho Chehab <mchehab@redhat.com>
cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: linux-wireless@vger.kernel.org
cc: devel@driverdev.osuosl.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-29 15:41:50 -04:00
Al Viro 75ef9de126 constify a bunch of struct file_operations instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09 14:16:20 -04:00
Al Viro 78846ce66d rtl8192u: switch to proc_create()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09 14:13:30 -04:00
Al Viro 5a787a6820 rtl8192u: don't play with reassigning ->proc_fops, just use proc_create()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09 14:13:09 -04:00
Haksu Jeong ab4a640efb staging: rtl8192u: fix coding style
Fix coding style of r8192U_dm.h

Signed-off-by: Haksu Jeong <hsjeong@snu.ac.kr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28 16:07:25 -07:00
Peter Huewe 67a88e6390 staging/rtl8192u/ieee80211: Fix buffer overflow in ieee80211_softmac_wx.c
Clang/scan-build complains about a possible buffer overflow in
ieee80211_wx_get_name:

.../staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c:499:3:
warning: String copy function overflows destination buffer
	strcat(wrqu->name," link..");

.../staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c:497:3:
warning: String copy function overflows destination buffer
	strcat(wrqu->name," linked");

The buffer wrqu->name is only IFNAMSIZ bytes big (currently 16),
so if we have a "802.11b/g/n linked" device we overrun the buffer by 3
bytes.

-> Use strlcopy / strlcat to populate the name.
This is done in a similar fashion in
staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c

While at it cleaned some whitespace issues.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-14 09:26:23 -08:00
Patrik Karlin 666b3bf2f1 staging: rtl8192u: fixed coding style issues in r8192U_core.c
This patch fixes some coding style issuses in r8192U_core.c
No logic is changed

Signed-off-by: Patrik Kårlin <patrik.karlin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11 16:37:11 -08:00
Patrik Karlin 29b48ae391 staging: rtl8192u: removed some non used else's
This patch removes some else blocks that has no function in the
code

Signed-off-by: Patrik Kårlin <patrik.karlin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11 16:37:11 -08:00
Patrik Karlin f00c493b51 staging: rtl8192u: fixed some coding style issues in r8192U_core.c
This patch fixes some coding style issues. in r8192U_core.c
No logic is changed.

Signed-off-by: Patrik Kårlin <patrik.karlin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11 16:37:11 -08:00
Sebastian Hahn de13a3dad6 staging/rtl8192u: do not init statics to 0
Fix the checkpatch error "do not initialize statics to 0 or NULL"

Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:53:41 -08:00
Sebastian Hahn 24fbe87525 staging/rtl8192u: use same indent for switch and case
Fix the checkpatch error "switch and case should be at the same indent"

Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:53:41 -08:00