1
0
Fork 0
Commit Graph

18 Commits (75a6f82a0d10ef8f13cd8fe7212911a0252ab99e)

Author SHA1 Message Date
Paul Gortmaker 5c2918a5ba rtl8192u: don't trample on <linux/ieee80211.h> struct namespace
In order to start reducing the duplicated code/constants/macros in this
driver, we need to include <linux/ieee80211.h> to provide the defacto
versions.  However this driver has structs with the same name as the
ones in the main include, so namespace collision prevents us from doing
step #1.

Since the structs actually differ in their respective fields, we can't
simply delete the local ones without impacting the runtime; a conversion
to use the global ones can be considered at a later date if desired.

Rename the ones here with a vendor specific prefix so that we won't have
the namespace collision, and hence can continue on with the cleanup.

Automated conversion done with:

    for i in `find . -name '*.[ch]'` ; do \
      sed -i 's/struct ieee80211_hdr/struct rtl_80211_hdr/g' $i ; \
    done

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:13 +02:00
Haneen Mohammed dde48b99d2 Staging: rtl8192u: Add space before open parenthesis
Space is required before the open parenthesis.
This patch adds space after if to address that issue.
This was done with the help of the following Coccinelle script:

@r@
position p1,p2;
@@
if@p1 (@p2 ...) {
        ...
}
@script:python@
p1 << r.p1;
p2 << r.p2;
@@

l1 = int (p1[0].line)
l2 = int (p2[0].line)
c1 = int (p1[0].column)
c2 = int (p2[0].column)
if (l2 == l1 and c1 + 2 != c2):
  cocci.include_match(False)

@@
position r.p1,r.p2;
@@
- if@p1 (
+ if (
...) {
        ...
}

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 10:35:33 +01:00
Vaishali Thakkar 9c18a05c45 Staging: rtl8192u: Use put_unaligned_le16 in rtl819x_BAProc.c
This patch introduces the use of function put_unaligned_le16.

This is done using Coccinelle and semantic patch used is as follows:

@a@
typedef u16, __le16, uint16_t;
{u16,__le16,uint16_t} e16;
identifier tmp;
expression ptr;
expression y,e;
type T;
type T;
@@

- tmp = cpu_to_le16(y);

<+... when != tmp
(
- memcpy(ptr, (T)&tmp, \(2\|sizeof(u16)\|sizeof(__le16)\|sizeof(uint16_t)\|sizeof(e16)\));
+ put_unaligned_le16(y,ptr);
|
- memcpy(ptr, (T)&tmp, ...);
+ put_unaligned_le16(y,ptr);
)
...+>
? tmp = e

@@ type T; identifier a.tmp; @@

- T tmp;
...when != tmp

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28 11:12:35 -08:00
Vaishali Thakkar 8dcb6a251a Staging: rtl8192u: Remove check of ieee in rtl819x_BAProc.c
This patch fixes following smatch warning:

drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:117
ieee80211_ADDBA() warn: variable dereferenced before check 'ieee' (see line 114)

As ieee can not be NULL at this point, all such checks are removed.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 14:21:59 -08:00
Greg Donald d59d6f5d38 staging: rtl8192u: Fix "space prohibited after that open parenthesis '('" errors
Fix checkpatch.pl "space prohibited after that open parenthesis '('" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:48:43 +08:00
Vaishali Thakkar baf9ef82fc Staging: rtl8192u: Annotate association types with proper endianness
This patch fixes following sparse warning at number of places in
file rtl819x_BAProc.c.

Warning: incorrect type in assignment (different base types)
         expected unsigned short [unsigned] [usertype] tmp
         got restricted __le16 [usertype] <noident>

Here, code before this change is correct. But this change silents
sparse warnings and will not harm code too.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 15:53:26 +08:00
Greg Donald 8048ed5b60 drivers: staging: rtl8192u: Fix "space prohibited after that open parenthesis '('" errors
Fix checkpatch.pl "space prohibited after that open parenthesis '('" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-08 13:44:22 -07:00
Greg Donald 0b4ef0a641 drivers: staging: rtl8192u: Fix space required after that ',' errors
Fix checkpatch.pl space required after that ',' errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:56:38 -07:00
Joe Perches f8628a47ba staging: Convert __FUNCTION__ to __func__
Use the normal mechanism for emitting a function name.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25 11:05:07 -07:00
Ana Rey 51296cdf9d staging: rtl8192u: make in ieee80211/rtl819x_BAProc.c some local functions static
Make some local functions (ActivateBAEntry, DeActivateBAEntry,
TxTsDeleteBA ,RxTsDeleteBA and ieee80211_send_DELBA) static and fix
coding style in this function declarations when It is necessary

Fix the following sparse warnings in ieee80211/rtl819x_BAProc.c

drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:16:6: warning: symbol 'ActivateBAEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:28:6: warning: symbol 'DeActivateBAEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:40:4: warning: symbol 'TxTsDeleteBA' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:70:4: warning: symbol 'RxTsDeleteBA' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:310:6: warning: symbol 'ieee80211_send_DELBA' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:46:55 -07:00
Teodora Baluta 46326d2622 Staging: rtl8192u: fix sparse warnings for static functions
Fix sparse warnings in static function in driver rtl8192u

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:39:32 -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
Sebastian Hahn 35997ff0ca staging/rtl8192u: cleanfile run
Run cleanfile on all files inside drivers/staging/rtl819u

Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de>
Signed-off-by: Jennifer Naumann <Jennifer.Naumann@informatik.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:52:58 -08:00
Masanari Iida 935d59ff25 staging: rtl8192u: Fix typo in staging/rtl8192u
Correct spelling typo in staging/rtl8192u

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:32:13 -07:00
Joe Perches 0ee9f67c40 Staging: rtl8187x: Use %pM for mac address output
Uncompiled.  Doesn't currently build anyway.

Converted MAC_FMT to %pM
Converted some %02x%02x%02x%02x%02x%02x to %pm
Converted MAC_ARG to direct use
Removed MAC_FMT and MAC_ARG macros

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:29 -08:00
Randy Dunlap 3d8affc001 Staging: rtl8192x: fix printk formats
Fix printk format warnings in rtl8192[eu]:

drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c:979: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:385: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:484: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:614: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c:848: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:343: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:442: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:572: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23 11:27:48 -08:00
Mauro Carvalho Chehab 50a09b3b09 Staging: rtl8192u: remove dead code
Remove #ifse against older kernel versions;
Remove codes marked with #if 0;
Remove #if 1

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:22 -08:00
Jerry Chuang 8fc8598e61 Staging: Added Realtek rtl8192u driver to staging
Add Realtek linux driver for rtl8192u as provided by Realtek

rtl8192u_linux_2.6.0006.1031.2008.tar.gz, send to me C/C staging ML.

This version won't compile against upstream, doesn't follow
Linux CodingStyle and has their own ieee80211 stack.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:22 -08:00