summaryrefslogtreecommitdiff
path: root/drivers/staging/wlan-ng/cfg80211.c
AgeCommit message (Collapse)Author
2013-02-18Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/iwlwifi/dvm/tx.c drivers/net/wireless/ti/wlcore/sdio.c drivers/net/wireless/ti/wlcore/spi.c
2013-02-11cfg80211: pass wiphy to cfg80211_ref_bss/put_bssJohannes Berg
This prepares for using the spinlock instead of krefs which is needed in the next patch to track the refs of combined BSSes correctly. Acked-by: Bing Zhao <bzhao@marvell.com> [mwifiex] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-07Staging: wlan-ng: Add missing argumentEmil Goode
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>
2012-09-26staging "wlan-ng" Fix typos.Justin P. Mattock
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19staging: wlan-ng: Fix dereference before NULL checkEmil Goode
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-04staging: wlan-ng: Fix problem with wrong argumentsEmil Goode
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-06-12staging/wlan-ng: cfg80211.c coding style cleanupDevendra Naga
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-04-24staging: wlan-ng: Release struct returned by cfg80211_inform_bss to avoid ↵Krzysztof Wilczynski
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-02-29Staging: wlan-ng: still setting wrong dataDan Carpenter
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-24Staging: wlan-ng: memsetting the wrong amount of dataDan Carpenter
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>
2011-05-24Merge ↵John W. Linville
ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
2011-05-19cfg80211: Use consistent BSS matching between scan and smeJouni Malinen
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-03staging: Remove a warning for drivers/staging/wlan-ng/cfg80211.cHarry Wei
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>
2010-11-10Staging: Update parameters for cfg80211 key management operationBen Hutchings
Commit e31b82136d1adc7a599b6e99d3321e5831841f5a ("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-09-04Staging: wlan-ng: Explicitly set some fields in cfg80211 interfaceKarl Relton
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-08-05Staging: wlan-ng: Update prism2_set_tx_power() to use mBmChristoph Fritz
Commit fa61cf70a6ae1089e459e4b59b2e8d8e90d8535e 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-03Staging: wlan-ng: remove typedef in p80211hdr.hEdgardo Hames
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-03Staging: wlan-ng: fix checkpatch issues in headers.Edgardo Hames
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-07-26Staging: wlan-ng: fix style in cfg80211.cEdgardo Hames
Fixed several errors reported by checkpatch. Signed-off-by: Edgardo Hames <ehames@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18Staging: wlan-ng: Switch from wext to cfg80211Karl Relton
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>