dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

18 Commits

Author SHA1 Message Date
Emil Goode 5f3b361a12 Staging: wlan-ng: Add missing argument
The commit c8442118 introduced a struct wireless_dev pointer
as a second argument of the function pointers set_tx_power
and get_tx_power. This patch adds the missing arguments for
the wlan-ng driver.

Sparse warnings:

drivers/staging/wlan-ng/cfg80211.c:735:25: warning:
	incorrect type in initializer (incompatible argument 2
	(different base types))
	drivers/staging/wlan-ng/cfg80211.c:735:25:
	expected int ( *set_tx_power )( ... )
	drivers/staging/wlan-ng/cfg80211.c:735:25:
	got int ( extern [toplevel] *<noident> )( ... )

drivers/staging/wlan-ng/cfg80211.c:736:25: warning:
	incorrect type in initializer (incompatible argument 2
	(different base types))
	drivers/staging/wlan-ng/cfg80211.c:736:25:
	expected int ( *get_tx_power )( ... )
	drivers/staging/wlan-ng/cfg80211.c:736:25:
	got int ( extern [toplevel] *<noident> )( ... )

drivers/staging/wlan-ng/cfg80211.c:735:2: warning:
	initialization from incompatible pointer type [enabled by default]

drivers/staging/wlan-ng/cfg80211.c:735:2: warning:
	(near initialization for ‘prism2_usb_cfg_ops.set_tx_power’)
	[enabled by default]

drivers/staging/wlan-ng/cfg80211.c:736:2: warning:
	initialization from incompatible pointer type [enabled by default]

drivers/staging/wlan-ng/cfg80211.c:736:2: warning:
	(near initialization for ‘prism2_usb_cfg_ops.get_tx_power’)
	[enabled by default]

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 09:50:40 -08:00
Justin P. Mattock d34602de3b staging "wlan-ng" Fix typos.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26 09:19:50 -07:00
Emil Goode 5d5d7c3b93 staging: wlan-ng: Fix dereference before NULL check
Smatch is warning about a dereference before we check for NULL.
This patch moves the dereference to after the NULL check.

Smatch warning:
drivers/staging/wlan-ng/cfg80211.c:345 prism2_scan() warn:
	variable dereferenced before check 'request' (see line 332)

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:28:14 +01:00
Emil Goode 01f8a27e3c staging: wlan-ng: Fix problem with wrong arguments
The function pointer scan in struct cfg80211_ops is not
supposed to be assigned a function with a struct net_device
pointer as an argument. Instead access the net_device struct
in the following way:

struct net_device *dev = request->wdev->netdev;

sparse gives these warnings:

drivers/staging/wlan-ng/cfg80211.c:726:17: warning:
        incorrect type in initializer (incompatible argument 2
        (different base types))
        expected int ( *scan )( ... )
        got int ( extern [toplevel] *<noident> )( ... )

drivers/staging/wlan-ng/cfg80211.c:726:2: warning:
        initialization from incompatible pointer type [enabled by default]

drivers/staging/wlan-ng/cfg80211.c:726:2: warning:
        (near initialization for ‘prism2_usb_cfg_ops.scan’)
        [enabled by default]

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:23:52 -07:00
Devendra Naga 8aac4d4439 staging/wlan-ng: cfg80211.c coding style cleanup
there are warnings that are reported by checkpatch.pl
fixed the following problems

drivers/staging/wlan-ng/cfg80211.c:130: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:366: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:543: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:665: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:692: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:735: WARNING: line over 80 characters

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:38:16 -07:00
Krzysztof Wilczynski 19f798ad00 staging: wlan-ng: Release struct returned by cfg80211_inform_bss to avoid potential memory leak.
Function cfg80211_inform_bss returns a pointer to a referenced struct cfg80211_bss
but no information is needed from this struct in function prism2_scan and therefore
we release it by calling cfg80211_put_bss.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-24 11:28:25 -07:00
Dan Carpenter 625aeb3aba Staging: wlan-ng: still setting wrong data
In commit 1ca1a92cc6 "Staging: wlan-ng: memsetting the wrong amount of
data" I changed the code so we didn't memset() past the end of the
msg1.bssid.data[] array.  Walter Harms noticed that it was weird that
we were setting the len to 6 when there were 7 elements in the array.
Pavel Roskin pointed out that the intent of the code was actually to
memset() msg1.bssid.data.data[] which is a 6 character array.

Reported-by: Walter Harms <wharms@bfs.de>
Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:55:52 -08:00
Dan Carpenter 1ca1a92cc6 Staging: wlan-ng: memsetting the wrong amount of data
p80211item_pstr6_t is the size of "msg1.bssid" (16 bytes) but
msg1.bssid.data is type p80211pstr6_t and it is smaller (7 bytes).  We
had just set that memory to zeroes earlier and now we're writing over it
with 0xff because we're writing past the end of the struct.

I don't know if this actually causes a problem.  It may be that we
initialize the extra 0xff bytes correctly later.  But the current code
is obviously wrong and we should fix it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:03:13 -08:00
John W. Linville 31ec97d9ce Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-05-24 16:47:54 -04:00
Jouni Malinen ed9d01026f cfg80211: Use consistent BSS matching between scan and sme
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>
2011-05-19 10:37:18 -04:00
Harry Wei 9005fcd89c staging: Remove a warning for drivers/staging/wlan-ng/cfg80211.c
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&current=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>
2011-05-03 12:52:00 -07:00
Ben Hutchings 34a488c1e0 Staging: Update parameters for cfg80211 key management operation
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>
2010-11-09 16:49:33 -08:00
Karl Relton aff3ea4e5d Staging: wlan-ng: Explicitly set some fields in cfg80211 interface
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>
2010-09-03 17:37:16 -07:00
Christoph Fritz 9015e49962 Staging: wlan-ng: Update prism2_set_tx_power() to use mBm
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>
2010-08-05 14:18:29 -07:00
Edgardo Hames 3d049431e0 Staging: wlan-ng: remove typedef in p80211hdr.h
This patch removes the only typedef in p80211hdr.h.

Signed-off-by: Edgardo Hames <ehames@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:21:30 -07:00
Edgardo Hames b6bb56e6aa Staging: wlan-ng: fix checkpatch issues in headers.
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>
2010-08-02 18:20:04 -07:00
Edgardo Hames 8dd82ebe7d Staging: wlan-ng: fix style in cfg80211.c
Fixed several errors reported by checkpatch.

Signed-off-by: Edgardo Hames <ehames@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26 15:35:47 -07:00
Karl Relton cb3126e60f Staging: wlan-ng: Switch from wext to cfg80211
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>
2010-06-18 15:22:55 -07:00