Commit graph

301 commits

Author SHA1 Message Date
Ebru Akagunduz e2665c2cbf Staging: wlan-ng: Fix do not add new typedefs in p80211mgmt.h
Fix checkpatch.pl issues with do not add new typedefs in p80211mgmt.h

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-10 23:35:11 -07:00
Ebru Akagunduz ade6509d1f Staging:wlan-ng: no space before tabs in p80211mgmt.h
Fix checkpatch.pl issues with no space before tabs
in p80211mgmt.h

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 13:48:03 -08:00
Himangi Saraogi 8cbe56e09c staging:wlan-ng:Fix sparse warning cast to restricted __le16
This patch fixes the following sparse warnings:
drivers/staging/wlan-ng/hfa384x_usb.c:3582:14: warning: cast to
restricted __le16
drivers/staging/wlan-ng/hfa384x_usb.c:3584:19: warning: cast to
restricted __le16
by changing the annotations in the struct declaration.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 13:48:03 -08:00
Tugce Sirin 4d8c1d0fdf Staging: wlan-ng: Fix Sparse warning should it be static?
This patch fixes following Sparse warning should it be static? in
staging/wlan-ng.

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 13:44:17 -08:00
Zhao, Gang 4e5e9d7c66 staging: wlan-ng: replace function ieee80211_dsss_chan_to_freq()
Replace ieee80211_dsss_chan_to_freq() with more generic
ieee80211_channel_to_frequency(), and add a variable to deal with 80
characters problem.

File cfg80211.c is included by p80211netdev.c, p80211netdev.c includes
<net/cfg80211.h>, both ieee80211_channel_to_frequency() and
IEEE80211_BAND_2GHZ is defined / declared in <net/cfg80211.h>. So this
change is safe.

This change is a preparation for the removal of function
ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}.

Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-18 11:16:56 -08:00
Alexey Khoroshilov b76ed59f75 staging: wlan-ng: fix leaks on failure paths in prism2sta_probe_usb()
There are leaks of resources allocated by wlan_setup() and usb_dev refcnt
on failure paths in prism2sta_probe_usb().

The patch adds appropriate deallocations and removes invalid code
from hfa384x_corereset() failure handling.
unregister_wlandev() is wrong because it is not registered yet.
hfa384x_destroy() is just noop in init state.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-11 12:52:42 -08:00
Paul Gortmaker 885a947e5b staging: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17 10:08:14 -08:00
Himangi Saraogi b21199116a staging:wlan-ng:hfa384x.h: remove typedef struct hfa384x_bytestr __packed hfa384x_bytestr_t
This patch removes the checkpatch.pl warning "do not add new typedefs"
and changes all source files that use that typedef. Also lines were
shortened to 80 characters to do away with the checkpatch.pl warning
"line over 80 characters" generated due to replacement of the
hfa384x_bytestr_t by struct hfa384x_bytestr in prism2mgmt.c,
prism2mgmt.h, prism2mib.c, prism2sta.c.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:49:00 -08:00
Himangi Saraogi bb1da756e0 staging:wlan-ng:cfg80211.c: Shorten lines to 80 characters
This patch removes checkpatch.pl warnings "line over 80 characters" in
cfg80211.c.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:49:00 -08:00
Ashvini Varatharaj 40e4205ad6 Staging: wlan-ng: changing "* dev" to "*dev"
Fix checkpatch error: ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:12:15 -07:00
Teodora Baluta 55da06eba8 Staging: wlan-ng: fix sparse warnings for static functions
Fix sparse warnings for static functions
* drivers/staging/wlan-ng/cfg80211.c:101:5: warning:
symbol 'prism2_change_virtual_intf' was not declared.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:26:13 -07:00
Ebru Akagunduz 6973c6b90a Staging: wlan-ng: fix printk(KERN_DEBUG in p80211wep.c
Fix checkpatch.pl issues with prefer netdev_dbg(netdev, .. then
dev_dbg(dev, .. then pr_debug(.. to printk(KERN_DEBUG in p80211wep.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:26:13 -07:00
Avinash Kumar eed8897133 staging: wlan-ng: cfg80211.c: replaced printk() with netdev_warn()
replaced printk functions used for debug messages by respective netdev_warn
netdev_err functions.

Signed-off-by: Avinash Kumar <avi.kp.137@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:44 -07:00
Avinash Kumar 263b8bb910 staging: wlan-ng: hfa384x_usb.c: replaced printk() debugs with netdev_warn()/netdev_err()
replaced the printk debug lines with respective netdev_warn()/netdev_err()

Signed-off-by: Avinash kumar <avi.kp.137@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:44 -07:00
Xenia Ragiadakou 57e6d78440 wlan-ng: replace calls to kmalloc and memcpy with kmemdup
This patch replaces calls to kmalloc that are followed
by memcpy with calls to kmemdup.
This patch was found using coccicheck with api/memdup.cocci,
with memdup.cocci script slightly altered in the following way:

@depends on patch@
expression from,to,size,flag;
position p != {r1.p,r2.p};
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = kmemdup(from,size,flag);
-  memcpy(to, from, size);

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 14:01:26 -07:00
Nick Østergaard 318e16b920 staging: wlan-ng: prism2usb.c: fix printk(KERN_ERR... to dev_err(dev, ...
Fix checkpatch warning. Change printk(KERN_ERR ... to dev_err(dev ...

Signed-off-by: Nick Østergaard <oe.nick@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-26 16:13:20 -07:00
Dan Carpenter 72c1c06d91 wlan-ng: add a bounds check
I'm not sure where these results come from, but it can't hurt to
add a sanity check the array offset.  The .results[] array on the
next line has HFA384x_CHINFORESULT_MAX (16) elements.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11 09:47:13 -07:00
Dan Carpenter a0cdd2e4a9 wlan-ng: clean up prism2sta_inf_chinforesults()
This function is ugly because it hits against the 80 character
limit.  This patch does several things to clean it up.

1) Introduces "result" instead of inf->info.chinforesult.result[n].
2) Reverses the ".scanchannels & (1 << i)" so everthing can be
   pulled in one indent level.
3) Use "chan" instead of "channel".
4) Tweaks the line breaks to the call to pr_debug().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11 09:47:13 -07:00
Linus Torvalds b5c78e04dd Staging tree update for 3.9-rc1
Here's the big staging tree merge for 3.9-rc1
 
 Lots of cleanups and updates for drivers all through the staging tree.
 We are pretty much "code neutral" here, adding just about as many lines
 as we removed.
 
 All of these have been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEUEABECAAYFAlEmW7QACgkQMUfUDdst+ymlIACXT5mv8Y5A/KJa+QLTNNsofI8u
 aACgq9hNZxJzX6VQMLXUV8+2SILOqYo=
 =5wIj
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging tree update from Greg Kroah-Hartman:
 "Here's the big staging tree merge for 3.9-rc1

  Lots of cleanups and updates for drivers all through the staging tree.
  We are pretty much "code neutral" here, adding just about as many
  lines as we removed.

  All of these have been in linux-next for a while."

* tag 'staging-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (804 commits)
  staging: comedi: vmk80xx: wait for URBs to complete
  staging: comedi: drivers: addi-data: hwdrv_apci3200.c: Add a missing semicolon
  staging: et131x: Update TODO list
  staging: et131x: Remove assignment of skb->dev
  staging: wlan-ng: hfa384x.h: fix for error reported by smatch
  staging/zache checkpatch ERROR: spaces prohibited around that
  staging/ozwpan: Mark read only parameters and structs as const
  staging/ozwpan: Remove empty and unused function oz_cdev_heartbeat
  staging/ozwpan: Mark local functions as static (fix sparse warnings)
  staging/ozwpan: Add missing header includes
  staging/usbip: Mark local functions as static (fix sparse warnings)
  staging/xgifb: Remove duplicated code in loops.
  staging/xgifb: Consolidate return paths
  staging/xgifb: Remove code without effect
  staging/xgifb: Remove unnecessary casts
  staging/xgifb: Consolidate if/else if with identical code branches
  staging: vt6656: replaced custom TRUE definition with true
  staging: vt6656: replaced custom FALSE definition with false
  staging: vt6656: replace custom BOOL definition with bool
  staging/rtl8187se: Mark functions as static to silence sparse
  ...
2013-02-21 12:11:44 -08:00
Kumar Amit Mehta 2e38027588 staging: wlan-ng: hfa384x.h: fix for error reported by smatch
Add the missing header include for 'struct urb' datatypes to avoid
potential build issues. Found using smatch.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-18 10:51:36 -08:00
John W. Linville 98d5fac233 Merge branch 'master' of 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-18 13:47:13 -05:00
Peter Huewe fae7e4d393 staging/wlan-ng: Fix 'Branch condition evaluates to a garbage value' in p80211netdev.c
clang/scan-build complains that:
p80211netdev.c:451:6: warning: Branch condition evaluates to a garbage
value
        if ((p80211_wep.data) && (p80211_wep.data != skb->data))
	            ^~~~~~~~~~~~~~~~~

This can happen in p80211knetdev_hard_start_xmit if
- if (wlandev->state != WLAN_DEVICE_OPEN) evaluates to true.
the execution flow then continues at the 'failed' label where
p80211_wep.data is used without being initialized first.

-> Initialize the data field to NULL to fix this issue.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-14 09:26:23 -08:00
Johannes Berg 5b112d3d09 cfg80211: pass wiphy to cfg80211_ref_bss/put_bss
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-02-11 18:44:52 +01:00
Garrick He eec0d0dc4e Staging: wlan-ng: Fix tab coding style issue in hfa384x.h
Fix all 'please, no space before tabs' warning found by checkpatch.pl

Signed-off-by: Garrick He <garrickhe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-03 17:42:07 -08:00
Greg Kroah-Hartman 8f5f90a872 Merge 3.8-rc5 into staging-next
This resolves a merge issue with a iio driver, and the zram code.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 21:25:02 -08:00
Sebastian Wankerl 25c97da8b9 wlan-ng/prism2mgmt.c: formated too long lines
Formated pr_debug() calls

Signed-off-by: Sebastian Wankerl <sisewank@cip.cs.fau.de>
Signed-off-by: Sebastian Ehrenfels <qi50dube@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20 15:56:59 -08:00
Sebastian Wankerl 52070c709d wlan-ng/prism2mgmt.c: added parantheses to macro
Enclose the macro into braces so that it can be closed by a semicolon

Signed-off-by: Sebastian Wankerl <sisewank@cip.cs.fau.de>
Signed-off-by: Sebastian Ehrenfels <qi50dube@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20 15:56:59 -08:00
Tormod Volden 811a37effd staging: wlan-ng: Fix clamping of returned SSID length
Commit 2e254212 broke listing of available network names, since it
clamped the length of the returned SSID to WLAN_BSSID_LEN (6) instead of
WLAN_SSID_MAXLEN (32).

https://bugzilla.kernel.org/show_bug.cgi?id=52501

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Cc: stable <stable@vger.kernel.org> # 3.4+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 16:38:07 -08:00
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
Kumar Amit Mehta 32adf1e553 staging: wlan-ng: hfa384x_usb.c: fixed a coding style issue
checkpatch.pl throws error message for the current code. This patch fixes
coding style issue.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-02 11:30:19 -07: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
Greg Kroah-Hartman 6a2a2cdd57 Merge 3.6-rc6 into staging-next
This pulls in the staging tree fixes in 3.6-rc6 into our branch to resolve the
merge issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-16 17:17:25 -07:00
Devendra Naga 5d6f5054e8 staging:wlan-ng: remove the remaining return at the end of void function
this removes the remaining return which the function actually
wants to return, for that it used goto failed and failed lable
have the return statement at the end of function, which is all
unnecessary, remove this and make the function return at the
places where it does the goto failed

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:22:25 -07:00
Devendra Naga 2b970b2d30 staging:wlan-ng: remove all the return statements at the end of functions
this file is having all unnecessary return statements at the end of functions
which return void, remove all of them.

some of the functions still uses the return for having the goto end,
which the label end defined at the end of the function which returns
void, this will be cleaned up in next change

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:22:25 -07:00
Devendra Naga 675be12f45 staging:wlan-ng: clean hfa384x_usbctlx_submit
else is not required as such we can do with just with a single if

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:22:24 -07:00
Devendra Naga 3f45932720 staging:wlan-ng: make wlan_unsetup void
this is because this function does a deinit job and most of the
deinit functions are expected to return void. Also this function
doesn't fail anywhere..

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:22:24 -07:00
Devendra Naga 909ff71041 staging:wlan-ng: clean some more functions
the function p80211netdev_rx doesnt' need a return at the end
and also remove some new lines

the function p80211knetdev_set_mac_address doesn't need the result
variable assigned as it gets a return from p80211req_dorequest function

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 15:42:52 -07:00
Devendra Naga 50d6b9baa0 staging:wlan-ng: clean register_wlandev function
we dont need i to just return the status of register_netdev

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 15:42:52 -07:00
Devendra Naga 102db1fc4a staging:wlan-ng: cleanup prism2sta_commsqual_defer and hfa384x_drvr_getconfig
the function prism2sta_commsqual_defer defines a goto done lable, which just
jumps to end of function, which we can achieve with out it

the hfa384x_drvr_getconfig doesn't need the result variable, we can
remove and just return the function

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 15:42:52 -07:00
Devendra Naga 311e24fb1a staging:wlan-ng: cleanup p80211skb_free and p80211skb_rxmeta_detach
these functions doesn't need return at the end of the function

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 15:42:51 -07:00
Devendra Naga 7694538cfa staging:wlan-ng: clean coding style problems in p80211req_mibset_mibget
clean this function to follow kernel coding way

remove double tabs
remove spaces

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 15:42:51 -07:00
Devendra Naga bdced87c37 staging:wlan-ng: p80211req_mibset_mibget should be void
this function always returning 0, there are no callers that checks
the return of this function, make this function return void

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 15:42:51 -07:00
Devendra Naga 009629ef44 staging:wlan-ng: clean p80211req_handlemsg
the switch case doesn't have a break statement of DIDmsg_dot11req_mibget,
and DIDmsg_dot11req_mibset cases, and also cleanup the code to follow
the kernel coding way

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 15:42:51 -07:00
Devendra Naga c3016c45df staging:wlan-ng: remove default case in the p80211req_handlemsg
default is redundant and remove it

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 15:42:51 -07:00
Devendra Naga 89e6302ce7 staging:wlan-ng: cleanup hfa384x_ctlxout_callback
goto done is not required and actually having goto done does
jumps the program to end of the function and calls return.
instead call return directly

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 15:42:51 -07:00
Devendra Naga 3f51425830 staging:wlan-ng: cleanup hfa384x_usbctlx_resptimerfn
goto done is not required and simple return is fine

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 15:42:51 -07:00
Devendra Naga ae24e13a64 staging:wlan-ng: fix sparse warnings
drivers/staging/wlan-ng/prism2fw.c:240:5: warning: symbol 'prism2_fwapply' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:379:5: warning: symbol 'crcimage' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:443:6: warning: symbol 'free_chunks' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:465:6: warning: symbol 'free_srecs' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:492:5: warning: symbol 'mkimage' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:585:5: warning: symbol 'mkpdrlist' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:659:5: warning: symbol 'plugimage' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:767:5: warning: symbol 'read_cardpda' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:857:5: warning: symbol 'read_fwfile' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:981:5: warning: symbol 'writeimage' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:1133:5: warning: symbol 'validate_identity' was not declared. Should it be static?

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 15:42:51 -07:00
Devendra Naga 023aeaa496 staging:wlan-ng: slove sparse warnings
drivers/staging/wlan-ng/prism2fw.c:127:18: warning: symbol 's3data' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:130:14: warning: symbol 'ns3plug' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:131:18: warning: symbol 's3plug' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:134:14: warning: symbol 'ns3crc' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:135:17: warning: symbol 's3crc' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:138:14: warning: symbol 'ns3info' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:139:18: warning: symbol 's3info' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:142:5: warning: symbol 'startaddr' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:145:14: warning: symbol 'nfchunks' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:146:17: warning: symbol 'fchunk' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:154:12: warning: symbol 'pda' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:155:21: warning: symbol 'nicid' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:156:20: warning: symbol 'rfid' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:157:20: warning: symbol 'macid' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:158:20: warning: symbol 'priid' was not declared. Should it be static?

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10 15:42:51 -07: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
Andy Shevchenko 1deef918ec staging: wlan-ng: use %*phC to hexdump small buffers
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:23:19 -07:00
Devendra Naga 1a46eafe1c staging/wlan-ng: use kzalloc rather using kmalloc at create_wlan
instead we would have used kzalloc, so our memory which is allocated will be set to 0.

codepath:

the code path here is prism2sta_probe_usb, calling when ever usb-dev id
and usb-vendor id e.t.c matches with what ever present in the MODULE_DEVICE_TABLE,

and in prism2sta_probe_usb , we call create_wlan, and its called nowhere else...

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 19:21:37 -07:00
Randy Dunlap c90e3e80b9 staging: reduce stack usage in prism2fw.c
Fix frame size (stack usage) warning by allocating and freeing
pointers to the data.

drivers/staging/wlan-ng/prism2fw.c:1115:1: warning: the frame size of 4288 bytes is larger than 2048 bytes

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 10:00:53 -07:00
Devendra Naga cf66823dd2 staging/wlan-ng: prsim2fw.c coding style cleanup
this patch fixes the coding style problems found by using checkpatch.pl

drivers/staging/wlan-ng/prism2fw.c:175: ERROR: "foo * bar" should be "foo *bar"
drivers/staging/wlan-ng/prism2fw.c:210: WARNING: line over 80 characters
drivers/staging/wlan-ng/prism2fw.c:596: WARNING: line over 80 characters
drivers/staging/wlan-ng/prism2fw.c:658: ERROR: "foo * bar" should be "foo *bar"

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
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 bb46f130a0 Staging: wlan-ng: off by one in prism2mgmt_scan_results()
Count is used to cap "req->bssindex.data" which is used as an offset
into the hw->scanresults->info.hscanresult.result[] array.  The array
has only HFA384x_SCANRESULT_MAX (31) elements so the 32 is off by one.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18 16:59:03 -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
Sebastiaan de Haan aa8c2a0358 staging: wlan-ng: p80211netdev.c: fixed checkpatch error
New kernel developer inspired by the 2010 FOSDEM talk. Running checkpatch on
p80211netdev.c gave the error: p80211netdev.c:153: ERROR: "foo * bar" should
be "foo *bar". Fixed it by doing what was suggested.

Signed-off-by: Sebastiaan de Haan <sebastiaan@sebastiaandehaan.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 11:59:57 -08:00
Dan Carpenter 2e25421294 Staging: wlan-ng: cap the ssid length
We're getting the ssid length from the scan here.  Let's cap it before
doing the memcpy().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:51:47 -08:00
Greg Kroah-Hartman bac2c126e4 USB: convert drivers/staging/* to use module_usb_driver()
This converts the drivers in drivers/staging/* to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.

Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.

Cc: "David Täht" <d@teklibre.com>
Cc: Marek Belisko <marek.belisko@gmail.com>
Cc: Al Cho <acho@novell.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Huajun Li <huajun.li.lee@gmail.com>
Cc: Zac Storer <zac.3.14159@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: edwin_rong <edwin_rong@realsil.com.cn>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Julia Lawall <julia@diku.dk>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Joe Perches <joe@perches.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-18 09:42:11 -08:00
Jiri Pirko afc4b13df1 net: remove use of ndo_set_multicast_list in drivers
replace it by ndo_set_rx_mode

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-17 20:22:03 -07:00
Jesper Juhl 3b44d227f6 Remove unneeded version.h include from drivers/staging/wlan-ng/prism2sta.c
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>
2011-07-05 10:39:38 -07:00
Joseph Salisbury 23567c7528 Staging: wlan-ng: fix brace coding style issue in prism2fw.c
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>
2011-06-28 14:31:16 -07: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
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Ilia Mirkin a6f9c48fdd staging: wlan-ng: Remove NULL check before kfree
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>
2011-03-14 11:57:38 -07:00
Bas van den Berg 7d3864d1f6 Staging: wlan-ng: fixed packed checkpatch warnings
Signed-off-by: Bas van den Berg <b.van.den.berg.nl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04 13:04:24 -08:00
Adam Thompson e80528b78e Staging: wlan-ng: fix 2 space coding style issues
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>
2011-01-31 14:12:18 -08:00
Greg Kroah-Hartman 491acf0032 Staging: Merge 2.6.37-rc2 into staging-next
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>
2010-11-16 10:44:50 -08:00
Maximiliano David Bustos c3444e50b2 Staging: wlan-ng: Fix wrong #ifdef #endif sequence
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>
2010-11-09 16:51:42 -08: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
Johan Meiring 6f710907ff Staging: wlan-ng: fixed coding style issues in p80211netdev.c
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>
2010-11-09 16:37:18 -08:00
Johan Meiring 869c4b4a71 Staging: wlan-ng: fixed coding style issues in p80211conv.h
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>
2010-11-09 16:37:17 -08:00
Johan Meiring f83dfd0658 Staging: wlan-ng: fix coding style issues in prism2mgmt.c
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>
2010-11-09 16:37:17 -08:00
Johan Meiring c5de2157b8 Staging: wlan-ng: fix coding style issues in p80211types.h
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>
2010-11-09 16:37:16 -08:00
Johan Meiring 4314e5a68a Staging: wlan-ng: fixed coding style issues in p80211netdev.h
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>
2010-11-09 16:37:16 -08:00
Johan Meiring 4eb28f7197 Staging: wlan-ng: fixed coding style issues in p80211conv.c
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>
2010-11-09 16:34:01 -08:00
Greg Kroah-Hartman e4c5bf8e3d Merge 'staging-next' to Linus's tree
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>
2010-10-28 09:44:56 -07:00
Tracey Dent ef3fdeea5d Staging: wlan-ng: Makefile: replace the use of <module>-objs with <module>-y
Changed <module>-objs to <module>-y in Makefile.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:23:43 -07:00
Uwe Kleine-König 9b0131cb24 staging/trivial: fix typos concerning "initiali[zs]e"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:23:26 -07: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 e5bdbb9029 Staging: wlan-ng: remove typedef in p80211ioctl.h
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>
2010-08-02 18:20:03 -07:00
Edgardo Hames 51e4896ada Staging: wlan-ng: fix style issues in p80211conv.h
This patch removes typedefs in p80211conv.h.

Signed-off-by: Edgardo Hames <ehames@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:20:03 -07:00
Edgardo Hames 93df38e593 Staging: wlan-ng: fix style issues for p80211hdr.h
Removed typedef and other style issues.

Signed-off-by: Edgardo Hames <ehames@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:20:03 -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
Andy Shevchenko cfa548960d staging: wlan-ng: remove own bin2hex converter
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>
2010-07-22 14:37:45 -07:00
Edgardo Hames e02644184c Staging: wlan-ng: removed typedef from prism2fw.c
Removed multiple typedef and fixed long lines.

Signed-off-by: Edgardo Hames <ehames@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 14:34:41 -07:00
Edgardo Hames f34e3e7b2c Staging: wlan-ng: fix style in p80211netdev.c
Signed-off-by: Edgardo Hames <ehames@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 14:34:35 -07:00
Randy Dunlap 9f79211cae Staging: fix wlan-ng depends
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>
2010-06-24 14:15:07 -07:00
Dan Carpenter 594578979d Staging: wlan-ng: silence a sparse warning
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>
2010-06-18 15:33:57 -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
Christoph Fritz 59497bba59 Staging: wlan-ng prism2usb: add suspend/resume
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>
2010-05-17 16:33:28 -07:00
Julia Lawall 7a6cb0d549 Staging: Use kcalloc or kzalloc
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>
2010-05-14 14:02:56 -07:00