It was pointed out by 'make versioncheck' that include of
linux/version.h is not needed in drivers/staging/wlan-ng/prism2sta.c .
This patch removes it.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the prism2fw.c file that fixes up a brace
warning found by the checkpatch.pl tool.
Signed-off-by: Joseph Salisbury <salisbury.joseph@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
cfg80211 scan code adds separate BSS entries if the same BSS shows up
on multiple channels. However, sme implementation does not use the
frequency when fetching the BSS entry. Fix this by adding channel
information to cfg80211_roamed() and include it in cfg80211_get_bss()
calls.
Please note that drivers using cfg80211_roamed() need to be modified to
fully implement this fix. This commit includes only minimal changes to
avoid compilation issues; it maintains the old (broken) behavior for
most drivers. ath6kl was the only one that I could test, so I updated
it to provide the operating frequency in the roamed event.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hi us,
When i was compiling kernel, a warning happened to me.
The warning said like following.
drivers/staging/wlan-ng/cfg80211.c:709: warning: initialization from
incompatible pointer type.
See http://s1202.photobucket.com/albums/bb364/harrywei/?action=view¤t=patched2.png
for more details.
So i patch like following.
Signed-off-by: Harry Wei <harryxiyou@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch to p80211conv.c fixes to space coding style warnings found
with checkpatch.pl
Signed-off-by: Adam Thompson <adam@lotpblog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This was necessary in order to resolve some conflicts that happened
between -rc1 and -rc2 with the following files:
drivers/staging/bcm/Bcmchar.c
drivers/staging/intel_sst/intel_sst_app_interface.c
All should be resolved now.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes bug #13820 from bugzilla.kernel.org.
Quote: "If ETHTOOL_GLINK is not defined, the end for switch case is not
to be found."
Signed-off-by: Maximiliano David Bustos <md.bustos90@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commit e31b82136d ("cfg80211/mac80211:
allow per-station GTKs") changed the signatures of these operations
but did not update the staging drivers.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the p80211netdev.c file that fixes warnings that were
found by the checkpatch.pl tool
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the p80211conv.h file that fixes two 80 character
line limit styling issues
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to prism2mgmt.c that fixes coding style issues found by
checkpatch.pl. Three instances of the 80 char line limit being exceeded
have been kept as is so that string literals are not split up.
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch that fixes various coding style issues in p80211types.h.
The typedef declarations have been kept as they seem necessary.
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the p80211netdev.h file that fixes up warnings found
by the checkpatch.pl tool. The typedefs have been left in place as they
seem necessary.
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the p80211conv.c file that fixes a couple of coding
style issues found by the checkpatch.pl tool.
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This merges the staging-next tree to Linus's tree and resolves
some conflicts that were present due to changes in other trees that were
affected by files here.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The cfg80211 api has introduced a few new fields. Rather than assume
what cfg80211 api does by default, set these explicitly.
Signed-off-by: Karl Relton <karllinuxtest.relton@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commit fa61cf70a6 updates nl80211's function
.set_tx_power to use mBm units instead of dBm for greater accuracy and
smaller power levels.
This patchs updates prism2_set_tx_power() accordingly.
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fix errors and warnings reported by checkpatch
in p80211meta.h and p80211metstruct.h.
Signed-off-by: Edgardo Hames <ehames@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patches removes the only typedef in p80211ioctl.h
Signed-off-by: Edgardo Hames <ehames@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
In kernel we have hex_asc_hi and hex_asc_lo macroses to do the job.
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/built-in.o: In function `wlan_free_wiphy':
(.text+0x3f5eb5): undefined reference to `wiphy_unregister'
drivers/built-in.o: In function `wlan_free_wiphy':
(.text+0x3f5ec4): undefined reference to `wiphy_free'
drivers/built-in.o: In function `wlan_create_wiphy':
(.text+0x3f5f76): undefined reference to `wiphy_new'
drivers/built-in.o: In function `wlan_create_wiphy':
(.text+0x3f6024): undefined reference to `wiphy_register'
drivers/built-in.o: In function `prism2_roamed':
(.text+0x3f61f7): undefined reference to `cfg80211_roamed'
drivers/built-in.o: In function `prism2_disconnected':
(.text+0x3f6223): undefined reference to `cfg80211_disconnected'
drivers/built-in.o: In function `prism2_connect_result':
(.text+0x3f626d): undefined reference to `cfg80211_connect_result'
drivers/built-in.o: In function `prism2_connect':
(.text+0x3f62b6): undefined reference to `ieee80211_frequency_to_channel'
drivers/built-in.o: In function `prism2_scan':
(.text+0x3f6679): undefined reference to `ieee80211_frequency_to_channel'
drivers/built-in.o: In function `prism2_scan':
(.text+0x3f6873): undefined reference to `__ieee80211_get_channel'
drivers/built-in.o: In function `prism2_scan':
(.text+0x3f68cc): undefined reference to `cfg80211_inform_bss'
drivers/built-in.o: In function `prism2_scan':
(.text+0x3f6942): undefined reference to `cfg80211_scan_done'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This doesn't change the behavior. It just silences a sparse warning.
drivers/staging/wlan-ng/hfa384x_usb.c:2810:62: warning: dubious: !x | !y
The point of the bitwise OR is so that a logical OR could short circuit
the second call to test_and_set_bit().
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Switch driver over from wext to cfg80211 interface.
Some Notes:
- This patch moves the driver wholesale from wext to cfg80211. Wext
support is still provided through the cfg80211 provided wext
compatability layer.
- Currently only infrastructure mode is implemented. Ad hoc mode is not
yet implemented, but can be added.
- It does not support connecting to a specified bssid, instead roaming
is handled by the card itself. This matches the behaviour of the
existing driver.
- It has been tested using NetworkManager (via wpa_supplicant)
configured to use the wext compatability layer, and then again with the
native nl80211 layer.
Signed-off-by: Karl Relton <karllinuxtest.relton@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
There is no need trying to load the (even in most cases) not availible
firmware after suspend. This saves about 30 secounds on reset waiting
for timeout.
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Use kcalloc or kzalloc rather than the combination of kmalloc and memset.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression x,y,flags;
statement S;
type T;
@@
x =
- kmalloc
+ kcalloc
(
- y * sizeof(T),
+ y, sizeof(T),
flags);
if (x == NULL) S
-memset(x, 0, y * sizeof(T));
@@
expression x,size,flags;
statement S;
@@
-x = kmalloc(size,flags);
+x = kzalloc(size,flags);
if (x == NULL) S
-memset(x, 0, size);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Refactor the wext interface to reduce lines of code & module text size.
- add a helper function p80211wext_getmib
- rename p80211wext_dorequest to p80211wext_setmib
- refactor wext to call the get/set mib helpers and so reduce repeated code.
size reported text reduction :-
text data bss dec hex filename
8343 720 0 9063 2367 p80211wext.o.patch
9907 720 0 10631 2987 p80211wext.o.orig
Tested on x86_32 laptop, everything works correctly using NetworkManager,
and iwconfig & iwlist return sensible results when reading from the card.
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Channel 14 is 2484 Mhz (cf p80211wext_channel_to_mhz) so this patch
corrects what seems to be just a typo.
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Use array initialisation technique copied from ipw2200.c.
This should always get the function pointers in the correct place,
without the needed for endless counting, skipping blanks etc.
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch includes the feedback received from Richard Kennedy.
Signed-off-by: Edgardo Hames <ehames@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the p80211conv.c file that fixed up a TAB and spaces
Errors found by the checkpatch.pl tools, like
spaces required around that '&' (ctx:VxV)
Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch for p80211req.c. An 'if' statement that spanned 80
characters has been split onto 2 lines and one of the tabs preceding
a comment has been removed.
Signed-off-by: Patrick Rooney <candyguitar@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch in hfa834x_usb.c to fix typedef declarations and long lines.
Signed-off-by: Edgardo Hames <ehames@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
Turns out that multiple people sent pretty much the same patch
for the same staging drivers. Commit these in two different
branches and merge them together to get a more complete coverage
of the cleanup and properly credit everyone for the work that they
did.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>