summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/scan.c
Commit message (Collapse)AuthorAgeFilesLines
* Libertas: cfg80211 supportKiran Divekar2010-06-231-1354/+0Star
| | | | | | | | | | | | | | Holger Schurig's patch (https://patchwork.kernel.org/patch/64286/) is rebased to latest wireless-testing tree. (Includes patches from me originally posted as "libertas: fix build error due to undefined symbol" and "libertas: unmangle capability value". -- JWL) Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Tested-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: fix several minor description typosWalter Goldens2010-06-021-1/+1
| | | | | Signed-off-by: Walter Goldens <goldenstranger@yahoo.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6John W. Linville2009-12-301-14/+8Star
|\ | | | | | | | | Conflicts: drivers/net/wireless/libertas/scan.c
| * libertas: Remove carrier signaling from the scan codeSamuel Ortiz2009-12-281-14/+8Star
| | | | | | | | | | | | | | | | | | There is no reason to signal a carrier off when doing a 802.11 scan. Cc: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | libertas: add access functions for mesh open/connect statusHolger Schurig2009-12-221-1/+1
|/ | | | | Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: sort and categorize entries in decl.hHolger Schurig2009-10-271-1/+1
| | | | | | | | | | This now makes decl.h only contain declarations for functions that don't have their own *.h file. No function change. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: remove "struct cmd_ds_gen"Holger Schurig2009-10-271-2/+2
| | | | | | | | It was only used as a source for S_DS_GEN, but the size of this struct is equal to the size of "struct cmd_header". Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: move scan/assoc related stuffHolger Schurig2009-10-271-0/+184
| | | | | | | | | | Another cfg80211-preparation patch: removes some code/definitions from main.c and dev.h and put's it into assoc.c/.h, scan.c/.h. No function change. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: change IW_ESSID_MAX_SIZE -> IEEE80211_MAX_SSID_LENHolger Schurig2009-10-271-3/+3
| | | | | | Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: remove unused 11d.h as well, priv->countryinfoHolger Schurig2009-10-271-21/+0Star
| | | | | | Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: remove unused 11d codeHolger Schurig2009-10-271-19/+3Star
| | | | | | | | | | | | | | Most of the 11d code was protected with an "if (priv->enable11d)" clause. But there was no code that anywhere that was able to set this variable to true. So all 11d code was dead for almost a year and no one complained. That's enought incentive to remove this code. Besides removing old cruft, we gain back the 11d capability in a common way when we merge the cfg80211 functionality. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: Check return status of command functionsAmitkumar Karwar2009-10-271-4/+7
| | | | | | | | | | Return status of lbs_prepare_and_send_command and lbs_cmd_with_response functions is not checked at some places. Those checks are added. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: Read outside array boundsRoel Kluin2009-07-291-1/+2
| | | | | | | | | | reads bss->rates[j] before checking bounds of index, and should use ARRAY_SIZE to determine the size of the array. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: libertas: fix unaligned accessesCliff Cai2009-06-031-1/+1
| | | | | | | | Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: restyle Marvell & IEEE TLV structure namesDan Williams2009-06-031-13/+16
| | | | | | | Easier to read and more conformant with kernel style. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: simplify and clean up association/start/join setupDan Williams2009-06-031-18/+14Star
| | | | | | | | | | Some of the parameters for association/join/start commands aren't used (like the FH and CF IEs for IBSS, and the FH IE for BSS), so get rid of their unions to reduce indirection. Also clean up structure names for kernel style. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2009-03-021-2/+2
|\ | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-tx.c net/8021q/vlan_core.c net/core/dev.c
| * libertas: fix misuse of netdev_priv() and dev->ml_privKiran Divekar2009-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mesh and radiotap interfaces need to use the same private data as the main wifi interface. If the main wifi interface uses netdev_priv(), but the other interfaces ->ml_priv, there's no way to figure out where the private data actually is in the WEXT handlers and netdevice callbacks. So make everything use ->ml_priv. Fixes botched netdev_priv() conversion introduced by "netdevice libertas: Fix directly reference of netdev->priv", though admittedly libertas' use of ->priv was somewhat "special". Signed-off-by: Kiran Divekar <dkiran@marvell.com> Acked-by: Dan Williams <dcbw@redhat.com> Tested-by: Chris Ball <cjb@laptop.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | libertas: pos[4] tested twice, 2nd should be pos[5]Roel Kluin2009-02-091-1/+1
|/ | | | | | | | pos[4] can't be both 0x43 and 0x04, 2nd should be pos[5] Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* netdevice: safe convert to netdev_priv() #part-3Wang Chen2008-11-131-2/+2
| | | | | | | | | | | | | | | | | | We have some reasons to kill netdev->priv: 1. netdev->priv is equal to netdev_priv(). 2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously netdev_priv() is more flexible than netdev->priv. But we cann't kill netdev->priv, because so many drivers reference to it directly. This patch is a safe convert for netdev->priv to netdev_priv(netdev). Since all of the netdev->priv is only for read. But it is too big to be sent in one mail. I split it to 4 parts and make every part smaller than 100,000 bytes, which is max size allowed by vger. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* don't use net/ieee80211.hJohannes Berg2008-11-101-38/+39
| | | | | | | | | | | | Convert all the drivers using net/ieee80211.h to use linux/ieee80211.h. Contains a bugfix in libertas where the SSID parsing could overrun the buffer when the AP sends invalid information. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Dan Williams <dcbw@redhat.com> [airo, libertas] Acked-by: Pavel Roskin <proski@gnu.org> [orinoco] Acked-by: David Kilroy <kilroyd@googlemail.com> [orinoco] Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: use individual buffers for printing ssid valuesJohn W. Linville2008-11-011-4/+8
| | | | | | Also change escape_ssid to print_ssid to match print_mac semantics. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: consolidate on a single escape_essid implementationJohn W. Linville2008-11-011-4/+7
| | | | Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2008-10-311-2/+2
|\ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/p54/p54common.c
| * libertas: fix buffer overrunJohannes Berg2008-10-291-2/+2
| | | | | | | | | | | | | | | | | | | | If somebody sends an invalid beacon/probe response, that can trash the whole BSS descriptor. The descriptor is, luckily, large enough so that it cannot scribble past the end of it; it's well above 400 bytes long. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: stable@kernel.org [2.6.24-2.6.27, bug present in some form since driver was added (2.6.22)] Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | net: convert print_mac to %pMJohannes Berg2008-10-281-7/+4Star
|/ | | | | | | | | | | | This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* libertas: convert CMD_802_11_RADIO_CONTROL to a direct commandDan Williams2008-08-291-0/+5
| | | | | | | | and return errors for operations like join & scan that aren't possible when the radio is turned off. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2008-07-151-2/+2
|\ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/netfilter/nf_conntrack_proto_tcp.c
| * libertas: fix memory alignment problems on the blackfinIhar Hrachyshka2008-07-091-2/+2
| | | | | | | | | | | | | | Fixing unaligned memory access on the blackfin architecture. Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@promwad.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | wext: Emit event stream entries correctly when compat.David S. Miller2008-06-171-17/+19
|/ | | | | | | | | | | | | | | | | | | | | | Three major portions to this change: 1) Add IW_EV_COMPAT_LCP_LEN, IW_EV_COMPAT_POINT_OFF, and IW_EV_COMPAT_POINT_LEN helper defines. 2) Delete iw_stream_check_add_*(), they are unused. 3) Add iw_request_info argument to iwe_stream_add_*(), and use it to size the event and pointer lengths correctly depending upon whether IW_REQUEST_FLAG_COMPAT is set or not. 4) The mechanical transformations to the drivers and wireless stack bits to get the iw_request_info passed down into the routines modified in #3. Also, explicit references to IW_EV_LCP_LEN are replaced with iwe_stream_lcp_len(info). With a lot of help and bug fixes from Masakazu Mokuno. Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2008-05-011-1/+2
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
| * libertas: fix use-before-check violationHolger Schurig2008-05-011-1/+2
| | | | | | | | | | | | | | | | According to Coverity (kudo's to Adrian Bunk), we had one use-before-check bug in libe libertas driver. This patch fixes this issue. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | wireless: use get/put_unaligned_* helpersHarvey Harrison2008-04-291-1/+1
|/ | | | | | | | | | Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: Michael Buesch <mb@bu3sch.de> Cc: Daniel Drake <dsd@gentoo.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* libertas: move association code from scan.c into assoc.cHolger Schurig2008-04-081-363/+1Star
| | | | | | | | | | | | Besides code moving, I did the following changes: * made some functions static * removed some unneeded #include's * made patch checkpatch.pl clean Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: move association code from join.c into scan.cHolger Schurig2008-04-081-1/+1
| | | | | | | | | | | | Besides code moving, I did the following changes: * made some functions static * removed some unneeded #include's * made patch checkpatch.pl clean Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: store rssi as an u32Holger Schurig2008-03-251-2/+2
| | | | | | | | | | Don't store an (hardware base) u8 value in bss_descriptor, but just an unsigned int (RSSI is really unsigned). Compilers generate more efficent code for ints than for bytes. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: implement SSID scanning for SIOCSIWSCANHolger Schurig2008-03-131-78/+67Star
| | | | | | | | | | | | | | | After my bit scan re-writing the SIOCSIWSCAN wext ioctl no longer supported scanning for a specific SSID. However, wpa_supplicant is a possible user of this ioctl, so here is code that add's this. While passing, removed even more of the debugfs-based scanning. You can (and should) the SIOCSIWSCAN to ask for scans, so there is no need for proprietary interfaces for scanning. And, besides, the scan result couldn't be used further, e.g. not for associating. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: clean up scan.c, remove zeromac and bcastmacDavid Woodhouse2008-03-061-234/+181Star
| | | | | | | | | Should be purely cosmetic apart from the removal of the two pointless MAC addresses. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert 802_11_SCAN to a direct commandDavid Woodhouse2008-03-061-81/+41Star
| | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: rename/document scan_channelHolger Schurig2008-02-291-11/+11
| | | | | | | | | | | | Rename last_scanned_channel to scan_channel, just so that a grep for struct bss_descriptor's last_scanned element doesn't show up so many positives. Also documented the variable and moved it to other scan related entries in lbs_private. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: make lbs_unset_basic_rate_flags() staticHolger Schurig2008-02-291-0/+17
| | | | | | | ... by moving it into the file where it's sole user resides Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Spelling fixes: lenght->lengthPaulius Zaleckas2008-02-031-1/+1
| | | | | Signed-off-by: Paulius Zaleckas <pauliusz@yahoo.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
* libertas: slight cleanup of netif queue stop/wakeDavid Woodhouse2008-01-291-5/+7
| | | | | | | | In particular, we shouldn't be waking the queues in lbs_host_to_card_done() any more. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: fix sparse endianness warnings in scan.cDavid Woodhouse2008-01-291-6/+5Star
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: kill struct lbs_adapterDavid Woodhouse2008-01-291-98/+90Star
| | | | | | | | There seems to be no reason for a separate structure; move it all into struct lbs_private. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: implement new scanning logicHolger Schurig2008-01-291-511/+360Star
| | | | | | | | | | | | | | | | This changes the code that is used for scanning and makes it hopefully easier to understand: * move function into logical blocks * create a bunch of lbs_scan_add_XXXX_tlv() functions, that help to create the TLV parameter of CMD_802_11_SCAN * all of them are now called from the much simpler lbs_do_scan() * no **puserscancfg double-pointers :-) Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: remove user-specified channel listHolger Schurig2008-01-291-57/+2Star
| | | | | | | | Remove the ability to specify channels to scan via debugfs Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: remove numprobesHolger Schurig2008-01-291-19/+1Star
| | | | | | | | Remove the ability to specify number of probes via debugfs Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: remove arbitrary typedefsHolger Schurig2008-01-291-38/+41
| | | | | | | | | | | | New typedefs are usually frowned upon. This patch changes libertas_adapter -> struct libertas_adapter libertas_priv -> struct libertas_priv While passing, make everything checkpatch.pl-clean that gets touches. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>