History log of /drivers/net/wireless/p54/eeprom.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ee40fa0656a730491765545ff7550f3c1ceb0fbc 27-May-2011 Paul Gortmaker <paul.gortmaker@windriver.com> drivers/net: Add export.h to files using EXPORT_SYMBOL/THIS_MODULE

These were getting the macros from an implicit module.h
include via device.h, but we are planning to clean that up.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

drivers/net: Add export.h to wireless/brcm80211/brcmfmac/bcmsdh.c

This relatively recently added file uses EXPORT_SYMBOL and hence
needs export.h included so that it is compatible with the module.h
split up work.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
/drivers/net/wireless/p54/eeprom.c
0d78156eef1d8869ea4e56f8a257252a8f262f04 20-Aug-2011 Christian Lamparter <chunkeey@googlemail.com> p54: improve site survey

The firmware keeps track of channel usage. This data can
be used by the automatic channel selection to find the best
channel.

Survey data from wlan4
frequency: 5200 MHz [in use]
noise: -91 dBm
channel active time: 811909 ms
channel busy time: 63395 ms
channel transmit time: 59636 ms
Survey data from wlan4
frequency: 5210 MHz
noise: -91 dBm
channel active time: 121 ms
channel busy time: 119 ms
channel transmit time: 0 ms

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
ce6cac88a4f1e52a51a31c31562f4da347543147 29-Apr-2011 John W. Linville <linville@tuxdriver.com> p54: avoid uninitialized variable warning for freq

CC [M] drivers/net/wireless/p54/eeprom.o
drivers/net/wireless/p54/eeprom.c: In function ‘p54_parse_rssical’:
drivers/net/wireless/p54/eeprom.c:494:8: warning: ‘freq’ may be used uninitialized in this function

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
a5a7103fe18eb4312bd89c9f136fb850af58faf4 27-Feb-2011 Felix Fietkau <nbd@openwrt.org> p54: fix a NULL pointer dereference bug

If the RSSI calibration table was not found or not parsed properly,
priv->rssi_db will be NULL, p54_rssi_find needs to be able to deal
with that.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
7a047f4f2f3a812f09f42aa784499a54dc4afcf2 12-Feb-2011 Christian Lamparter <chunkeey@googlemail.com> p54: enhance rssi->dBm database import

This patch fixes several shortcomings of the
previous implementation. Features of the
rewrite include:

* handles undocumented "0x0000" word at the
start of the frequency table.
(Affected some early? DELL 1450 USB devices
and my Symbol 5GHz miniPCI card.)

* supports more than just one reference point
per band. (Also needed for the Symbol card.)

* ships with default values in case the eeprom
data is damaged, absent or unsupported.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
a3162eed04ae76be710d895978478aa6d849de41 12-Feb-2011 Christian Lamparter <chunkeey@googlemail.com> p54: p54_generate_band cleanup

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
192abece7565ab37048dfd5eced966cfb2fda6f5 12-Feb-2011 Christian Lamparter <chunkeey@googlemail.com> p54: sort channel list by frequency instead of channel index

Some channel indices of the low 5GHz band clash with
those of the 2.4GHz band. Therefore we should go
with the channel's center frequency.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
0d91f22b75347d9503b17a42b6c74d3f7750acd6 15-Oct-2010 Julia Lawall <julia@diku.dk> drivers/net/wireless/p54/eeprom.c: Return -ENOMEM on memory allocation failure

In this code, 0 is returned on memory allocation failure, even though other
failures return -ENOMEM or other similar values.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression ret;
expression x,e1,e2,e3;
@@

ret = 0
... when != ret = e1
*x = \(kmalloc\|kcalloc\|kzalloc\)(...)
... when != ret = e2
if (x == NULL) { ... when != ret = e3
return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: <stable@kernel.org>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
268bae0b6879f238ba57f5f801958d1254e136f7 24-Aug-2010 John W. Linville <linville@tuxdriver.com> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

Conflicts:
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
d7eb50c0f7cb5d3ebb7bea8c681a6dfda3819a3b 17-Aug-2010 Christian Lamparter <chunkeey@googlemail.com> p54: improve eeprom parser

Like other vendors, p54* devices have a checksum for
the EEPROM descriptor data. This patch enhances the
parser code to generate and verify the data fields,
before initializing the radio-chip on the card.

Note:
If you have to bootstrap an alternative EEPROM image
for your device and you don't know how to generate a
valid crc ccitt checksum, you should take a look at:
http://git.kernel.org/?p=linux/kernel/git/chr/p54tools.git

The "checksum" utility loads a binary p54 EEPROM blob
(use the -f switch, to skip the check) and applies
the correct crc automatically.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
5db5584441c2dceb75696fb31a44ac7b9b925359 12-Aug-2010 Joe Perches <joe@perches.com> drivers/net/wireless: Restore upper case words in wiphy_<level> messages

Commit c96c31e499b70964cfc88744046c998bb710e4b8
"(drivers/net/wireless: Use wiphy_<level>)"
inadvertently changed some upper case words to
lower case. Restore the original case.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
c96c31e499b70964cfc88744046c998bb710e4b8 26-Jul-2010 Joe Perches <joe@perches.com> drivers/net/wireless: Use wiphy_<level>

Standardize the logging macros used.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
27b81bbed881ae93e8c23c216129cdeee86d4051 15-May-2010 Julia Lawall <julia@diku.dk> drivers/net/wireless/p54: Use kmemdup

Use kmemdup when some other buffer is immediately copied into the
allocated region.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
statement S;
@@

- to = \(kmalloc\|kzalloc\)(size,flag);
+ to = kmemdup(from,size,flag);
if (to==NULL || ...) S
- memcpy(to, from, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

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>
/drivers/net/wireless/p54/eeprom.c
93a59d7527147e3656664aa3179f8d19de256081 31-Oct-2009 Christian Lamparter <chunkeey@googlemail.com> p54: disable channels with incomplete calibration data sets

James Grossmann [1] reported that p54 spews out confusing
messages instead of preventing the mayhem from happening.

the reason is that "p54: generate channel list dynamically"
is not perfect. It didn't discard incomplete channel data
sets and therefore p54 advertised to support them as well.

[1]: http://marc.info/?l=linux-wireless&m=125699830215890

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: James Grossmann <cctsurf@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
e6a3f551bc236010c4d4d99e626e150e98a4c3e6 20-Jul-2009 Larry Finger <Larry.Finger@lwfinger.net> p54: Eliminate unnecessary initialization

In two places, variables are unnecessilarly initialized to NULL.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
1a9b6679adfb8ef1f1f3dbb7ebd2ee72e2ea4b56 11-Jul-2009 Christian Lamparter <chunkeey@web.de> p54: generate channel list dynamically

This patch enhances the eeprom parser to generate customized
channel list for every device.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c
4c8a32f57105a78c49e01f083717cdb531d3c2b9 23-Jun-2009 Christian Lamparter <chunkeey@web.de> p54: Move eeprom code

Copy the eeprom code from p54common.c into a new file eeprom.c

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/p54/eeprom.c