aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8187se/r8180_core.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-08-11param: remove unnecessary writable charpRusty Russell1-3/+3
sysfs-writable charp arguments need to be locked against modification (since the old ones may be kfreed underneath us). String arguments are much simpler, so use them for small strings (eg. IFNAMSIZ). lkdtm only uses the parameters at module initialization time, so there's not much point making them writable. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: M. Mohan Kumar <mohan@in.ibm.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Jeff Mahoney <jeffm@suse.com> Cc: Julia Lawall <julia@diku.dk> Cc: devel@driverdev.osuosl.org
2010-06-30Staging: rtl8187se: Fix compile warnings in 2.6.35-rc2Larry Finger1-2/+0
In commit bbfb5652, the spacing in the definitions of eqMacAddr and cpMacAddr in drivers/staging/rtl8187se/r8180_core.c were changed to conform to kernel standards. These definitions were duplicates of lines found in drivers/staging/rtl8187se/ieee80211/dot11d.h. Once the change was made, the following warnings were emitted: CC [M] drivers/staging/rtl8187se/r8180_core.o drivers/staging/rtl8187se/r8180_core.c:69:0: warning: "eqMacAddr" redefined drivers/staging/rtl8187se/ieee80211/dot11d.h:39:0: note: this is the location of the previous definition drivers/staging/rtl8187se/r8180_core.c:70:0: warning: "cpMacAddr" redefined drivers/staging/rtl8187se/ieee80211/dot11d.h:40:0: note: this is the location of the previous definition The fix is to keep only the difinition in the header file. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-14Staging: rtl8187se: fixed C99 comments style issues in r8180_core.cPrashant P. Shah1-223/+233
This is a patch to the r8180_core.c file that fixes the C99 comments style issues found by the checkpatch.pl tool. Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-14Staging: rtl8187se: fixed space style issues in r8180_core.cPrashant P. Shah1-816/+806
This is a patch to the r8180_core.c file that fixes the space style issues found by the checkpatch.pl tool. Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: rtl8187se: fix coding style issues in r8180_core.cJohn Church1-49/+49
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John Church <j.church@ymail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: rtl8187se: Hoist assign from ifJoe Perches1-2/+4
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo1-0/+1
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-04Staging: merge staging patches into Linus's main branchGreg Kroah-Hartman1-326/+176
There were a number of patches that went into Linus's tree already that conflicted with other changes in the staging branch. This merge resolves those merge conflicts. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: r8187se: Remove two private variables that have a fixed valueLarry Finger1-90/+0
For the RTL8187SE, the variable priv->rf_chip is always RF_ZEBRA4 and priv->RegThreeWireMode is always HW_THREE_WIRE_SI. Remove these 2 variables. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03staging: r8187se: Remove write_phy routineLarry Finger1-37/+0
Remove a routine that is not used. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: r8187se: Fix for LED not following radio switchLarry Finger1-3/+4
The current driver does not follow the state of the RF switch. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03staging: r8187se: Change to use common eeprom routines in EEPROM_93CXLarry Finger1-15/+53
The TODO list includes switching this driver to use the common EEPROM routines in EEPROM_93CX. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Tested by: Bernhard Schiffner <bernhard@schiffner-limbach.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: Fix continuation line formatsJoe Perches1-2/+1
String constants that are continued on subsequent lines with \ are not good. Fixed a "is tryied" / tried typo Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: r8187se: Fix a faulty if and do additional cleanupsLarry Finger1-183/+122
Cleanup the driver and fix a faulty if statement. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Tested by: Bernhard Schiffner <bernhard@schiffner-limbach.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: rtl8187se: fix if statementDan Carpenter1-1/+1
I removed a misplace semicolon. It is clear from the indentation that TxPwrTracking87SE() was only supposed to be called if CheckTxPwrTracking() returned true. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-19Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6David S. Miller1-2/+2
Conflicts: drivers/net/wireless/iwlwifi/iwl-core.h
2010-01-14Staging: r8187se: Fix compile error from wireless-testing commit 7044cc56Larry Finger1-2/+2
In wireless-testing, commit 7044cc56 added struct ieee80211_hdr_3addr to include/linux/ieee80211.h. This definition collides with one that is in the r8187se driver in staging. The conflict is resolved by changing r8187se to use the definition from include/linuc/ieee80211.h. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-23Staging: fix rtl8187se compilation errors with mac80211George Kadianakis1-5/+5
This patch fixes compilation problems that were caused by function naming conflicts between the rtl8187se driver and the mac80211 stack. Signed-off-by: George Kadianakis <desnacked at gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: rtl8187se: Remove card_typeLarry Finger1-9/+0
The vendor-written driver for the RTL8187SE has a private variable for the card type, even though it only occurs in PCI format. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: rtl8187se: Remove card8185 variable to simplify flowLarry Finger1-198/+41
When this code is used for the rtl8187se, the value of card_8185 in struct r8180_priv is always 7 or 8. As a result, the program flow can be simplified. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Tested-by: Bernhard Schiffner <bernhard@schiffner-limbach.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: fix assorted typos all over the placeAndré Goddard Rosa1-5/+5
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: Fix comment-out-typoMichael Buesch1-1/+1
This fixes a comment-out-typo that resulted in a dangling if-branch. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: rename struct ieee80211_hdr to struct ieee80211_hdr_4addrBartlomiej Zolnierkiewicz1-2/+2
ieee80211_hdr name is too generic so use ieee80211_hdr_4addr one instead (which matches the naming used by rtl8192su driver). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove ENABLE_IPS ifdefsBartlomiej Zolnierkiewicz1-4/+0
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: cleanup r8180_core.cBartlomiej Zolnierkiewicz1-1167/+245
* remove commented out code * remove useless comments * beautify code Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: merge r8180_pm.c with r8180_core.cBartlomiej Zolnierkiewicz1-2/+61
* merge r8180_pm.c with r8180_core.c * make functions static Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove unused rtl8225_rf_* functionsBartlomiej Zolnierkiewicz1-4/+0
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove debugging code from r8180_core.cBartlomiej Zolnierkiewicz1-381/+3
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove unused radio frontendsBartlomiej Zolnierkiewicz1-4/+0
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove dead codeBartlomiej Zolnierkiewicz1-520/+2
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove CONFIG_RTL8180_IO_MAP ifdefsBartlomiej Zolnierkiewicz1-83/+0
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove CONFIG_RTL8185B ifdefsBartlomiej Zolnierkiewicz1-289/+0
CONFIG_RTL8185B is defined in drivers/staging/rtl8187se/r8180_hw.h. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove CONFIG_RTL818x_S ifdefsBartlomiej Zolnierkiewicz1-40/+0
CONFIG_RTL818x_S is defined in drivers/staging/rtl8187se/r8180_hw.h. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove CONFIG_RTL8180_PM ifdefsBartlomiej Zolnierkiewicz1-7/+0
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove ENABLE_DOT11D ifdefsBartlomiej Zolnierkiewicz1-20/+0
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove support for older wireless extensionsBartlomiej Zolnierkiewicz1-16/+0
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove kernel version compatibility wrappersBartlomiej Zolnierkiewicz1-115/+5
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: rtl8187se: remove duplicate dot11d.h and ieee80211.h includesBartlomiej Zolnierkiewicz1-1/+1
Always use includes from ieee80211/ subdirectory. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-05net: convert remaining non-symbolic return values in ndo_start_xmit() functionsPatrick McHardy1-2/+2
This patch converts the remaining occurences of raw return values to their symbolic counterparts in ndo_start_xmit() functions that were missed by the previous automatic conversion. Additionally code that assumed the symbolic value of NETDEV_TX_OK to be zero is changed to explicitly use NETDEV_TX_OK. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-19Staging: rtl8187se: convert to net_device_opsAlexander Beregalov1-10/+15
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-05-08Staging: rtl8187se: Fix compilation warnings and procfs directory leakLarry Finger1-38/+8
Fix some warnings during compilation and correct a programming error that was leaking a directory in /proc. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Tested-by: Bernhard Schiffner <bernhard@schiffner-limbach.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: rtl8187se: ! x & y problem in inactive codeRoel Kluin1-1/+1
Fix ! x & y problem in inactivated code Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-02workqueue: add to_delayed_work() helper functionJean Delvare1-4/+4
It is a fairly common operation to have a pointer to a work and to need a pointer to the delayed work it is contained in. In particular, all delayed works which want to rearm themselves will have to do that. So it would seem fair to offer a helper function for this operation. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Greg KH <greg@kroah.com> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-27Staging: rtl8187se: Fix oops and memory poison caused by builtin ieee80211.leandro Costantino1-1/+1
when modprobe and removing rtl8187se ( just for testing, i do not have that card , and oops and a memory poison error happens on the builtin ieee80211 of that driver. I dont know if they will port it to the current ieeee80221 instead of the builtin ones, but just in case i attach a proposed fix for that problem. - Change for loop on ieee80211_crypto_deinit for list_for_each_safe to remove items. Is there an spinlock needed here? - Call ieee80211_crypto_deinit after exiting all registerd crypto protocols. Signed-off-by: Costantino Leandro <lcostantino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07staging: __FUNCTION__ is gcc-specific, use __func__Harvey Harrison1-6/+6
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06Staging: rtl8187se: remove duplicate pci idsGreg Kroah-Hartman1-0/+2
We only want to load for one PCI device, the "SE" device. The other PCI devices that this driver supports are already supported by the existing rtl8187 module. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: add rtl8187se driverGreg Kroah-Hartman1-0/+6826
This is a driver for the Realtek 8187 "SE" wireless PCI devices in some netbook computers (MSI Wind, and others). It includes its own copy of the ieee80211 stack, but it is compiled into the driver to prevend duplicate symbol issues. This version comes from Ralink with no authorship, but it is based on an old version of the rtl8180 driver from Andrea Merello. It was hacked up a bit to get it to build properly within the kernel tree and to properly handle the merged wireless stack within the driver. Cc: Andrea Merello <andreamrl@tiscali.it> Cc: linux-wireless <linux-wireless@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>