Commit graph

67 commits

Author SHA1 Message Date
Vipin Mehta
d0e0086893 staging: ath6kl: Fixing disappearing of scan list due to jiffies wrap over
When jiffies wrap-over, all the BSS in the cache is removed. Wrap-over of
jiffies is not handled in the correct way. This cause the scan list to go
empty during this time for a small duration

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:53 -08:00
Vipin Mehta
28f7e85a4b staging: ath6kl: Fixing accidental overwriting of probed ssid list in the hardware
Fixing the code to avoid overwriting of the first index in the probed ssid
list maintained by the hardware. This index is used to store broadcast SSID.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:52 -08:00
Vipin Mehta
98b6d2381a staging: ath6kl: Adding state in driver to track the sme state
Adding state in driver to track the sme state. The connect/disconnect
events from the driver were messing up the state maintained within the
cfg80211 module.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:52 -08:00
Vipin Mehta
9ea979d3b9 staging: ath6kl: Fixing the cached copy of the BSS filter set by user
Fixing the cached copy of the BSS filter set by user.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:52 -08:00
Vipin Mehta
0ad7fdde6c staging: ath6kl: Fixing memory leak
The patch fixes a mismatch in the allocation and free of scatter HIF bus
requests in the suspend/resume path.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:52 -08:00
Vipin Mehta
711a1bccf2 staging: ath6kl: Add configuration for excessive TX retry threshold
Adding host side interface to configure the excessive TX retry threshold.
It is used by the target to determine disconnection triggers. Additionally,
some definitions have been added to header file wmi.h to bridge the gap
for the newly added command.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:51 -08:00
Vipin Mehta
1581595dd9 staging: ath6kl: Fixing a memory leak
Fix for a memory leak discovered during suspend/resume testing.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:51 -08:00
Vipin Mehta
774c1fe2fe staging: ath6kl: Fixing a memory leak
Virtual Scatter Gather Lists not getting freed during the HTCStop(). The
patch adds some clean up code in the code path.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:51 -08:00
Vipin Mehta
fb9b548717 staging: ath6kl: Adding support for txop bursting enable/disable
Adding compile time support for enabling/disabling txop bursting.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:51 -08:00
Vipin Mehta
15eccc06e1 staging: ath6kl: Consolidating hardware configuration
Move all the wmi configuration commands done after wmi_ready to a single
function.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:51 -08:00
Vipin Mehta
caf3fb4194 staging: ath6kl: Fixing driver initialization for manufacturing mode
Fixing the driver initialization for manufacturing mode that involves
downloading a firmware binary meant for RF tests on the factory floor.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:51 -08:00
Vipin Mehta
83195cc8a8 staging: ath6kl: Fixing target crash due to mismatch connect/disconnect
Firmware design requires a WMI_DISCONNECT_CMD for every WMI_CONNECT_CMD to
clear the firmware previous profile state. There is one case in linux host
driver where two WMI_CONNECT_CMD are given without a WMI_DISCONNECT_CMD.
This causes firmware state to mismatch causing an ASSERT. Use the driver
state variable arConnectPending to track whether a WMI_CONNECT_CMD is
issued to firmware.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:50 -08:00
Vipin Mehta
3f2fd78e68 staging: ath6kl: Return correct scan complete status
Return correct scan complete status to the cfg80211 module based on
the value returned from the hardware.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:50 -08:00
Vipin Mehta
e8763b5fe8 staging: ath6kl: Fixing key settings for WPA/WPA2
A bug was observed during the reconnection phase in the WPA/WPA2-PSK scenario
where the EAPOL frames were going encrypted during an auto reconnection
attempt. The initial 4-way handshake would go fine but then the driver
was getting a command to set default keys sometime later. Setting of an
incorrect flag (TX_USAGE) in the hadrware was causing the EAPOL frames during
the subsequent 4-way handshake attempts to go encrypted causing the AP to
reject the station.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:49 -08:00
Vipin Mehta
da101d5635 staging: ath6kl: Fixing a NULL pointer exception
The driver was dereferencing a NULL pointer because of the device instance
being registered via the set_wiphy_dev() function. The function
ar6000_avail_ev() was passing the argument as NULL instead of using the one
returned by the MMC stack through the probe callback.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:49 -08:00
Joe Perches
4f69cef0a9 staging: ath6kl: Remove #define A_OK
Just use 0.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 14:34:51 -08:00
Joe Perches
a1d4652963 staging: ath6kl: Convert (status != A_OK) to (status)
Just use the status variable as a test not a comparison.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 14:34:51 -08:00
Joe Perches
f68057e6fa staging: ath6kl: Convert A_INT32 to s32
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 14:34:51 -08:00
Joe Perches
cb1e370987 staging: ath6kl: Convert A_INT16 to s16
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 14:34:50 -08:00
Joe Perches
f2ab1275cb staging: ath6kl: Convert A_INT8 to s8
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 14:34:50 -08:00
Joe Perches
c353f4b397 staging: ath6kl: Convert A_UINT64 to u64
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 14:34:50 -08:00
Joe Perches
e1ce2a3afe staging: ath6kl: Convert A_UINT32 to u32
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 14:34:50 -08:00
Joe Perches
4853ac05cf staging: ath6kl: Convert A_UINT16 to u16
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 14:34:50 -08:00
Joe Perches
ab3655dae4 staging: ath6kl: Convert A_UINT8 to u8
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 14:34:49 -08:00
Joe Perches
4c42080f3e staging: ath6kl: Convert A_CHAR to char
Remove obfuscating A_CHAR uses, just use char.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 14:34:49 -08:00
Joe Perches
1071a134d0 staging: ath6kl: Remove A_BOOL and TRUE/FALSE
Use kernel bool and true/false.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 14:34:49 -08:00
Greg Kroah-Hartman
949c3676cd Staging: Merge branch 'staging-next' into 2.6.38-rc3
This was done to resolve conflicts in the following files due
to patches in Linus's tree and in the staging-next tree:
	drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
	drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 13:35:58 -08:00
Joe Perches
8205669a40 staging: ath6kl: Convert tspecCompliance from A_BOOL to int
Make the use in wmi_verify_tspec_params match the declaration
of the variable.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:14 -08:00
Joe Perches
34603829c4 staging: ath6kl: Convert sets of scanSpecificSsid to TRUE/FALSE.
Don't use 0/1 for an A_BOOL.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:14 -08:00
Joe Perches
5bb5572ab6 staging: ath6kl: Convert A_NETBUF_QUEUE_EMPTY to return TRUE or FALSE
Make the return an A_BOOL not int.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:14 -08:00
Joe Perches
ebb8e49098 staging: ath6kl: Convert A_UINT8 is_amsdu and is_acl_data_frame to A_BOOL
Use A_BOOL as appropriate for actual variable uses.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:13 -08:00
Joe Perches
e2ad9082eb staging: ath6kl: cfg80211: Convert forceFgScan to A_UINT32
It's declared that way in the prototype, use it that way too.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:13 -08:00
Joe Perches
6be02be5f9 staging: ath6kl: Convert 0 to FALSE
Convert a set of an A_BOOL from 0 to FALSE.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:13 -08:00
Joe Perches
bd1188851e staging: ath6kl: Convert A_BOOL compressed sets from 0 to FALSE
Use the appropriate define.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:12 -08:00
Joe Perches
807208fe77 staging: ath6kl: Convert BDADDR_Present uses to TRUE/FALSE bugfix
The previous uses of BDADDR_Present set the initial value to
A_ERROR (-1) when not present and A_OK (0) when present.

A later test for (!BDADDR_Present) was therefore logically inverted.
Convert the values to TRUE/FALSE and the test is now logically correct.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:12 -08:00
Joe Perches
879cf160ed staging: ath6kl: Convert type of streamExists to A_UINT8
Make the declaration type match the assigned from type.
It's not a bool, it's a u8.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:12 -08:00
Joe Perches
f192c2bded staging: ath6kl: Convert bypasswmi to bool
Types should match logical uses.
Remove unused extern, make static.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:12 -08:00
Joe Perches
ae8e1e7ad2 staging: ath6kl: wmi.h: Convert packed structures with A_BOOL to u32
These structures are device native and need to be 4 bytes long.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:12 -08:00
Joe Perches
391bb2116a staging: ath6kl: Remove A_FAILED macro
Remove obfuscating A_FAILED(foo) macro.
Just test for foo instead.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:11 -08:00
Joe Perches
509c9d9730 staging: ath6kl: Remove A_SUCCESS macro
Remove obfuscating A_SUCCESS(foo) macro.
Just test for !foo instead.

Reformat a few macros that used A_SUCCESS for better readability.
Add do { foo } while (0) surrounds to those macros too.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:11 -08:00
Joe Perches
1f4c34bded staging: ath6kl: Convert enum A_STATUS to int
Convert enum members to int as well.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:53:11 -08:00
Joe Perches
a789325dc3 staging: ath6kl: Update cfg80211 to recent calling convention changes
Add bool unicast and bool multicast to set_default_key
Return struct net_device * to add_virtual_intf

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-31 13:49:55 -08:00
Ralph Loader
3ec6080e2e staging: Fix some incorrect use of positive error codes.
Use -E... instead of just E... in a few places where negative error
codes are expected by a functions callers.  These were found by grepping
with coccinelle & then inspecting by hand to determine which were bugs.

The staging/cxt1e1 driver appears to intentionally use positive E...
error codes in some places, and negative -E... error codes in others,
making it hard to know which is intended where - very likely I missed
some problems in that driver.

Signed-off-by: Ralph Loader <suckfish@ihug.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21 12:35:50 -08:00
Justin P. Mattock
e6856764dc staging: ath6kl Remove CONFIG_HAS_WAKELOCK
The patch below removes CONFIG_HAS_WAKELOCK since it is no longer in the kernel.
Please let me know, if this is the proper way of doing this and/or more needs
to be done..

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20 15:34:34 -08:00
Phillip Simbwa
64911e4b13 Staging: ath6kl: fix potential buffer overflow
Off by one

Signed-off-by: Phillip Simbwa <simbwa at gmail dot com>
Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20 12:01:23 -08:00
Joe Perches
859171ca92 drivers/staging: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:06:47 -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
Ben Hutchings
5f2e877386 Staging: ath6kl: Fix pointer casts on 64-bit architectures
Remove unnecessary cast of firmware base address to integer before
adding an offset.

Fix direct use of sk_buff::network_header which is an offset rather
than a pointer on 64-bit architectures.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:49:02 -08:00
Jesper Juhl
3c4e9c8497 staging, ath6kl: Remove unnecessary casts of void ptr returning alloc function return values
Hi,

The [vk][cmz]alloc(_node) family of functions return void pointers which
it's completely unnecessary/pointless to cast to other pointer types since
that happens implicitly.

This patch removes such casts from drivers/staging/ath6kl/

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:44:47 -08:00
Hauke Mehrtens
22b4dc5917 Staging: ath6kl: Adapt API changes in cfg80211
The cfg80211 API changed in commit e31b82136d

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 13:33:27 -08:00