summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath6kl
AgeCommit message (Collapse)Author
2011-12-16Merge remote branch 'wireless-next/master' into ath6kl-nextKalle Valo
Conflicts: drivers/net/wireless/ath/ath6kl/init.c
2011-12-14ath6kl: support for P2P mgmt operations on station interfaceAarthi Thiruvengadam
This patch enables support for doing P2P management operations like device discovery on top of a station interface. After group formation, the station interface will become a P2P GO/client interface as the case may be. This feature requires modifications to a couple of existing WMI structures and therefore new command ids and structures have been defined in order to be compatible with older firmware versions and other chips. The exception here is the wmi_connect_cmd. Adding a new field to the end of the structure will not cause any issues with previous firmware versions since firmware only checks for minimum length of the command. The other structures are of variable length, hence it was not possible to add new fields to the end. The new command ids have to be added to the end of enum wmi_cmd_id, so it has updated to match the firmware. The driver will support both the 'old' and the 'new' commands for a while by checking the firmware capabilities. Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-14ath6kl: Support different uart_tx pin and refclk configurationRyan Hsu
AR6003 family use uart_tx=8 and refclk=26Mhz by default, and AR6004 family uses different uart_tx pin and could also support various xtal source, moves these per hw configuration. Signed-off-by: Ryan Hsu <ryanhsu@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-13ath6kl: implement scheduled scanKalle Valo
ath6kl firmware supports scheduled scan functionality with the wow ssid filter. But the firmware does not send any events after scan results so I had to add a timer which notifies about new scan results. Sched scan needs firmware version 3.2.0.6 or later. If firmware doesn't support sched scan the driver will not enable the feature. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-13ath6kl: fix reading of FW IE capabilitiesKalle Valo
For some strange reason I used ALIGN() to calculate index to the buffer. That is totally bogus and wouldn't work when it tried to read the second bit. Fix it by removing the ALIGN() altogether. Also check that ie_len is not too short. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-13ath6kl: fix value of WOW_FILTER_SSIDKalle Valo
According to the firmware engineers WOW_FILTER_SSID is actually the second bit, not the first. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-13ath6kl: implement ath6kl_cfg80211_stop_all()Kalle Valo
During suspend we need to stop all vifs, not just the first. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-13ath6kl: call ath6kl_cfg80211_stop() from ath6kl_close()Kalle Valo
This way it's possible to keep all disconnect logic in one function and easier to add new functionality, like stopping scheduled scan. There are some changes to commands called during network interface close, but there should not be any visible changes in functionality. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-13ath6kl: remove a workaround from ath6kl_cfg80211_stop()Kalle Valo
There's a workaround in ath6kl_cfg80211_stop() which emits disconnected even when sme_state was disconnected. This is legacy from the old staging driver and I can't repoduce the old problem anymore. I assume the bug got fixed while the driver was cleaned up so let's get rid of the hack. This makes it possible to call ath6kl_cfg80211_stop from ath6kl_close() which happens in a followup patch. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-13ath6kl: cleanup ath6kl_priv()Kalle Valo
It really should not return a void pointer. Also remove useless casts from its users. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-13ath6kl: Use delayed key configuration for WAPI in AP modeJouni Malinen
This is needed to allow WAPI AP to configure the initial group key to the target in the same way as is done with TKIP/CCMP. This fixes broadcast data frame delivery with the initial group key. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-24ath6kl: Increase the maximum number of connections in AP modeVasanthakumar Thiagarajan
The maximum number of clients which ath6kl can support in AP mode is 10. The limitation of 8 connections is only for older chipsets which ath6kl does not support. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-24ath6kl: remove unused sc_params from struct ath6klKalle Valo
It was only initialised but not used anywhere. Also remove two defines which ended up unused after this change. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-24ath6kl: fix ath6kl's set tx powerLuis R. Rodriguez
ath6kl assumed cfg80211 passed to us power in dBm but it is in mBm. Cc: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-24ath6kl: use a larger buffer for debug outputDan Carpenter
The return value of snprintf() is the number of bytes which would have been copied if there was enough space, but we want the number of bytes actually copied. The scnprintf() function does this. Also in theory, a %u can take take 10 digits so we may as well make the buffer larger as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-22Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux Conflicts: drivers/net/wireless/iwlegacy/iwl-debugfs.c drivers/net/wireless/iwlegacy/iwl-rx.c drivers/net/wireless/iwlegacy/iwl-scan.c drivers/net/wireless/iwlegacy/iwl-tx.c include/net/bluetooth/bluetooth.h
2011-11-21cfg80211: add flags for off-channel capabilitiesJohannes Berg
Currently mac80211 implements these for all devices, but given restrictions of some devices that isn't really true, so prepare for being able to remove the capability for some mac80211 devices. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-21ath6kl: Use mutex to protect dma buffer in sync read writeRaja Mani
Firmware crashes while starting Soft AP in 32 bit x86 platform. The reason is that the single dma buffer (ar_sdio->dma_buffer) is used in ath6kl_sdio_read_write_sync() for unaligned buffer handling and this function is called in the multiple context at the same time. So, finally hits dma buffer corruption and firmware crash. Mutex is used to protect dma buffer to avoid data corruption. Spin lock can not used to fix this issue since mmc stack read/write calls may for sleep. Observed this issue with recently commited patch "ath6kl: Claim sdio function only at appropriate places" 861dd058f495973c7ad2a44b8f68f3cc05733eab kvalo: change name of mutex to more descriptive and add a comment about what it protects Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-21ath6kl: unlock if ath6kl_cfg80211_connect() failsDan Carpenter
There is an unlock missing on this error path. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-21ath6kl: Enable multiple vif supportVasanthakumar Thiagarajan
The maximum number of supported virtual interfaces are 3. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-21ath6kl: Find ar->max_norm_iface in firmware IE parsingVasanthakumar Thiagarajan
Currently the max number of vifs which can be used for non-p2p mode is determined in ath6kl_core_alloc(). But the maximum supported vifs are parsed from firmware IE in ath6kl_fetch_fw_api2() which would happen after ath6kl_core_alloc(). Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-21ath6kl: Remove modparam multi_norm_if_supportVasanthakumar Thiagarajan
This modparam was introduced to enable non-p2p mode operation on two virtual interfaces. It does not seem to be necessary to have a separate module parameter to do that. Instead, this option can be enabled when any one of the interfaces is not going to be used for p2p (ath6kl_p2p). Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-21ath6kl: indicate probe-resp offload supportArik Nemtsov
The ath6kl responds to probe-requests in HW while operating as an AP. It supports offloading exclusions to support the WPS, WPS2, P2P and 802.11u protocols. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: Fix AP mode operation after interface down/upVasanthakumar Thiagarajan
When operating AP interface is brough down the mode is reset to STA. This STA will be reconfigured into AP mode when the interface is brought up again. This sequence will be successful only when change_virtual_intf() returns with no error, but there is a check in this callback which does the type change only when that interface is active. This callback does nothing more than saving the new interface type to vif and wdev, so the sanity check for interface state and wmi state is not necessary. This makes the AP interface functional again after interface down/up. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: Clear WPS ctrl flag if zero length IE is received from cfg80211Raja Mani
Connect control flag CONNECT_WPS_FLAG has to be cleared by default even if the driver receives zero length IE from cfg80211. Otherwise this flag would be always set after WPS exchange which would lead wpa_supplicant to fail to connect with the received WPS credentials. This issue is observed only in OPEN security. kvalo: use cfg80211 instead of CFG in the commit log Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: add firmware IE for maximum number of vifsKalle Valo
Not all firmwares support multiple vifs and we need to read the limit from the firmware image. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: make maximum number of vifs runtime configurableKalle Valo
Needed when detecting how many vifs firmware supports. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: add firmware filename info to struct ath6kl_hwKalle Valo
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: add ar6004 firmwares to sdio moduleKalle Valo
When adding ar6004 SDIO support I forgot to add corresponding MODULE_FIRMWARE() definitions to sdio.c. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: use hardware version names consistentlyKalle Valo
Part of ath6kl uses "REV3" style of naming hardware versions and elsewhere "hw 2.1.1" is used instead for the same version. This is confusing, use the latter term everywhere. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: add name field to struct ath6kl_hwKalle Valo
To make it easier to print name for each hardware type. Also move the hw info print to ath6kl_init_hw_start() which is more logical place for it. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: add firmware IE for board data addressKalle Valo
Board data address can change between firmwares so we need to read that from the firmware image. Also fix debug log for the patch address to print the address in hex. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: add board address to struct ath6kl_hwKalle Valo
This is to make it configurable by firmware IEs. Also determine if we need to write or read the board address to the chip by checking if board address is set or not. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: move hw version related to parameters to structKalle Valo
It's easier to handle the values when they are defined in a struct. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-16ath6kl: remove hw version related parameter definesKalle Valo
Having separate defines, in a different file, makes it difficult to read the actual values. As we are just setting named fields in a struct the defines don't make any sense anymore. There are no functional changes, only moving of constants. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: Fix bug in setting dot11_auth_mode in AP modeVasanthakumar Thiagarajan
OPEN_AUTH is passed as dot11_auth_mode by default, this would affect the AP mode when configured with shared authentication type. Assign appropriate auth type to fix this from driver. A patch in wpa_supplicant (wpa_supplicant: Set configured auth_algs) is also needed to fix this. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: Fix bug in setting default key index for tx in AP modeVasanthakumar Thiagarajan
vif->def_txkey_index is set to key_index in ath6kl_cfg80211_add_key(). If the interface is configured with multiple static wep keys, vif->def_txkey_index would be holding the index of the last key configured, not the default tx key index. Remove this unnecessary default key index setting in ath6kl_cfg80211_add_key() to configure the right key index in WEP thereby make it work when multiple wep keys are configured. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: enable USB supportKalle Valo
Now two modules are built, ath6kl_sdio.ko and ath6kl_usb.ko. But the USB module isn't fully functional yet as HTC layer is missing support and that's why it's marked as experimental for now. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: disable HTC for USB devicesKalle Valo
As HTC layer doesn't support USB devices return an error if that happens. USB support will be added to HTC in the future, this is just a temporary solution. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: add USB supportKalle Valo
Add USB support for ar6004. Currently only firmware can be booted, no commands can be sent to firmware yet as HTC layer doesn't work with USB yet. Based on patches by Kevin Fang. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: add hif_typeKalle Valo
In some rare cases core code needs to know what hif type is used. Add a field to struct ath6kl to denote that. Hopefully this is just a temporary solution. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: AR6004 SDIO supportNaveen Gangadharan
Add support for AR6004 SDIO. Tested scan, association (open mode) and ping. kvalo: change commit log a bit, drop board address changes Signed-off-by: Naveen Gangadharan <ngangadh@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: firmware boot fixes for ar6004Kalle Valo
These have changed a bit since last time ar6004 code was commited. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: update ar6004 definitionsKalle Valo
Add also hw 1.1. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: move diag commands to hif driverKalle Valo
This is preparation for USB support which will have different diag commands. Based on code by Kevin Fang. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: change bmi sizes being configurable by HIFKalle Valo
SDIO and USB have different maximum sizes for BMI commands so make that configurable. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: move bmi calls to hif driverKalle Valo
In preparation for USB support which has it's own method for bmi. Based on code by Kevin Fang. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: Fix target minimum length requirement for WMI_SEND_PROBE_RESPONSE_CMDIDAarthi Thiruvengadam
The firmware expects the minimum length of WMI_SEND_PROBE_RESPONSE_CMDID to be 13. However, when the device is a P2P GO and it needs to send a probe response to a non-P2P client, there are no P2P IEs to be added, and therefore the length of the WMI command is 12. This command gets rejected by the firmware. To fix this, add an extra byte to satisfy the minimum length requirement. Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: Fix cfg80211 warning while starting IBSS modeRaja Mani
When the connect event is received from the target in IBSS mode, cfg80211_ibss_joined() is called without informing BSS info to cfg80211 layer which internally hits the below WARN_ON message. WARNING: at net/wireless/ibss.c:33 __cfg80211_ibss_joined+0x153/0x180 [cfg80211]() [..] [ 4916.845878] Call Trace: [ 4916.845889] [<c10427d2>] warn_slowpath_common+0x72/0xa0 [ 4916.845905] [<f8bccc63>] ? __cfg80211_ibss_joined+0x153/0x180 [cfg80211] [ 4916.845918] [<f8bccc63>] ? __cfg80211_ibss_joined+0x153/0x180 [cfg80211] [ 4916.845923] [<c1042822>] warn_slowpath_null+0x22/0x30 [ 4916.845934] [<f8bccc63>] __cfg80211_ibss_joined+0x153/0x180 [cfg80211] [ 4916.845941] [<c1025108>] ? default_spin_lock_flags+0x8/0x10 [ 4916.845952] [<f8bb7fcd>] cfg80211_process_rdev_events+0x19d/0x220 [cfg80211] [ 4916.845962] [<f8bb669b>] cfg80211_event_work+0x2b/0x50 [cfg80211] [ 4916.845968] [<c105aae6>] process_one_work+0x116/0x3c0 [ 4916.845977] [<f8bb6670>] ? cfg80211_get_dev_from_info+0x40/0x40 [cfg80211] [ 4916.845982] [<c105cdf0>] worker_thread+0x140/0x3b0 [ 4916.845986] [<c105ccb0>] ? manage_workers+0x1f0/0x1f0 [ 4916.845991] [<c1060c64>] kthread+0x74/0x80 [ 4916.845995] [<c1060bf0>] ? kthread_worker_fn+0x160/0x160 [ 4916.846001] [<c14e7bbe>] kernel_thread_helper+0x6/0x10 [ 4916.846005] ---[ end trace 769254924e409367 ]--- This patch make sures that BSS info is delivered via cfg80211_inform_bss() to cfg80211 in advance before intimating IBSS status to cfg80211. In addition to this, one debug message is also added to know ad-hoc mode status (creator/joiner). kvalo: change subject Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-13ath6kl: Fix packet drop when ath6kl_cookie runs outVasanthakumar Thiagarajan
"ath6kl: Maintain virtual interface in a list" mistakenly stops the netq only when the mode is ibss. This causes packet drops in sta mode when the available cookies (buffer abstraction in ath6kl and also used for tx throttling) runs out for the highest priority traffic. This patch just fixes this regression though the original code may still need fixes which can be addressed in separate patches. Reported-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>