summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2013-10-18Merge branch 'for-linville' of git://github.com/kvalo/athJohn W. Linville
2013-10-18Merge branch 'for-upstream' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
2013-10-18iwlwifi: mvm: fix operator precedenceDavid Spinadel
Integers need to be multiplied before division. Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-18iwlwifi: mvm: fix fw_rx_stats debugfs entryLuciano Coelho
The fw_rx_stats entry in debugfs was getting truncated because the internal buffer used to hold the string was too short. The calculation of the needed buffer size was rather bogus. Simplify the calculation by multiplying the number of entries in the entire structure by the size of each data line and adding the size of the header lines. Additionally, add the mac_id value, which was missing. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-18iwlwifi: mvm: BT Coex - enable Tx power based on BT statusEmmanuel Grumbach
The activity grading indication from the firmware should not be used in this case, but the bt_status in the firwmare notification. Fix that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-18iwlwifi: mvm: BT Coex - always set mandatory fieldsEmmanuel Grumbach
The firmware always expects the Coex Mode to be set. Moreover, the firmware expects bit 0 is the valid bits to be set all the times. I misunderstood the API and didn't set these bits when commands are sent to update the paramters of the Coex. As a result, the firmware understood that the BT Coex was disabled (Coex mode = 0) and ignored all the updates (valid bit 0 clear). Fix that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-18iwlwifi: mvm: NVM - increase max section sizeIdan Kahlon
Section size limitation to 6000 is incorrect. NVM file need to support bigger sections in order to support PAPD tables. Signed-off-by: Idan Kahlon <idanx.kahlon@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Maor Perez <maorx.perez@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-16ath10k: add might_sleep() to ath10k_wmi_cmd_send()Kalle Valo
ath10k_wmi_cmd_send() will now sleep if there are no credits available. To make it easier to catch callers in atomic context add might_sleep() to the function. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: fix ath10k_bss_assoc() to not sleep in atomic contextKalle Valo
ath10k_bss_assoc() was calling ath10k_peer_assoc(), which can sleep, under atomic rcu_read_lock() and causing scheduing while atomic errors. Workaround that by delaying the call to ath10k_wmi_peer_assoc(). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: remove unnecessary checksMichal Kazior
mac80211 interface iteration functions that were used originally iterated over interfaces that weren't re-added to the driver during recovery. Since internal vif list is now used it's safe to remove the safe-guard as internal vif list is based on add/remove_interface function which guarantees that vdev is created in FW before it is iterated over. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: fix scheduling while atomic config bugMichal Kazior
Recent HTC/WMI changes introduced the bug. ath10k was using _atomic iteration function with sleepable functions. mac80211 provides another iteration function but it cannot be safely called in hw_config() callback due to local->iflist_mtx being possibly acquired already. The patch uses internal vif list for iteration purposes and removes/refactors no longer necessary _iter functions. Reported-By: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: track vif list internallyMichal Kazior
mac80211 interface interations functions have peculiar locking issues. This patch introduces internal (to ath10k) vif list that will be used for vif iteration purposes. kvalo: remove extra INIT_LIST_HEAD() Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: fix add_interface failure handlingMichal Kazior
If something failed along add_interface() setup it was possible to leak a vdev id, vdev and peer. This could end up with leaked FW state or FW crash (assuming add_interface() failure wasn't a result of a crash). kvalo: rebased, whitespace fixes Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: use workqueue to set WEP TX keyMichal Kazior
Recent WMI/HTC changes made it possible for WMI commands to sleep (if there's not enough HTC TX credits to submit a command). TX path is in an atomic context so calling WMI commands in it is wrong. This simply moves WEP key index update to a worker and fixes the 'scheduling while atomic' bug. This still leaves multiple WEP key handling laggy, i.e. some frames may be TXed with an old/different key (although recipient should still be able to RX them). kvalo: changed the title Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: return better errno for unsupported pdev paramsBartosz Markowski
Return -EOPNOTSUPP if given parameter is not supported by firmware. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: rename WMI_CMD_UNDEFINEDBartosz Markowski
Rename WMI_CMD_UNDEFINED to WMI_CMD_UNSUPPORTED. This is more accurate here. Also return -EOPNOTSUPP instead of -EINVAL in wmi_cmd_send(). Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: do not warn about unsupported vdev paramBartosz Markowski
10.X firmware does not support WMI_VDEV_PARAM_TX_ENCAP_TYPE. It's a known limitation and we should not warn about this. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-14rt2x00: rt2800lib: remove duplicate rf_vals for RF3053Kevin Lo
lready have rf_vals_3x with same values. Hence rf_vals_3053 is removed in this patch. Signed-off-by: Kevin Lo <kevlo@kevlo.org> Acked-by: Paul Menzel <paulepanter@users.sourceforge.net> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: rt2800lib: fix RF registers for RT5390/RT5392Kevin Lo
Update rf registers to use the same values that the MediaTek/Ralink reference driver DPO_RT5572_LinuxSTA_2.6.1.3_20121022 uses. References: RF5390RegTable in chips/rt5390.c RF5392RegTable in chips/rt5390.c Tested on TP-Link TL-WN727N and D-Link DWA-140 Rev.b3 usb wifi dongles. Signed-off-by: Kevin Lo <kevlo@kevlo.org> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14mwifiex: use alloc_workqueue() functionAmitkumar Karwar
It replaces deprecated create_workqueue(). Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k_hw: remove references to hw->confFelix Fietkau
Accessing it to get the current operating channel is racy and in the way of further channel handling related changes Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k: make ath9k_uses_beacons staticFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k: remove sc->config.cabqReadyTimeFelix Fietkau
It is not exposed as a configuration option anyway Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k: move channel change code to ath_set_channelFelix Fietkau
Preparation for adding the scanning state machine to ath9k Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k: make ath9k_cmn_update_ichannel staticFelix Fietkau
Rework its wrapper function to make it more generic, using it as a replacement for previous calls to ath9k_cmn_update_ichannel. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k_hw: simplify channel flagsFelix Fietkau
There was some duplication between channelFlags and chanmode, as well as a lot of redundant checks based on the combinations of flags. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k_hw: remove IS_CHAN_OFDM()Felix Fietkau
The hardware is always configured with OFDM support enabled Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k_hw: remove IS_CHAN_B()Felix Fietkau
Hardware 802.11b-only mode isn't supported by the driver (the device is configured for 802.11n/g instead). Simplify the code by removing checks for it. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k_hw: remove direct accesses to channel mode flagsFelix Fietkau
Use wrappers where available. Simplifies code and helps with further improvements to the channel data structure Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k: use a separate data structure for rx buffersFelix Fietkau
There's no shared code for handling both rx and tx buffers, and tx buffers require a lot more metadata than rx buffers. Using a separate data structure for rx reduces memory usage and improves cache footprint. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14wcn36xx: fix coccinelle warningsFengguang Wu
drivers/net/wireless/ath/wcn36xx/debug.c:27:11-31: WARNING opportunity for simple_open, see also structure on line 106 /c/kernel-tests/src/i386/drivers/net/wireless/ath/wcn36xx/debug.c:27:11-31: WARNING opportunity for simple_open, see also structure on line 148 This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. Generated by: coccinelle/api/simple_open.cocci CC: Eugene Krasnikov <k.eugene.e@gmail.com> CC: John W. Linville <linville@tuxdriver.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: rt73usb: use rt2x00_has_cap_* helpersGabor Juhos
Use the appropriate helper functions instead of directly accessing the rt2x00dev->cap_flags field to check device capability flags. This improves readability of the code a bit. Compile tested only. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: rt61pci: use rt2x00_has_cap_* helpersGabor Juhos
Use the appropriate helper functions instead of directly accessing the rt2x00dev->cap_flags field to check device capability flags. This improves readability of the code a bit. Compile tested only. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: rt2800lib: use rt2x00_has_cap_* helpersGabor Juhos
Use the appropriate helper functions instead of directly accessing the rt2x00dev->cap_flags field to check device capability flags. This improves readability of the code a bit. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: rt2x00lib: use rt2x00_has_cap_* helpersGabor Juhos
Use the appropriate helper functions instead of directly accessing the rt2x00dev->cap_flags field to check device capability flags. This improves readability of the code a bit. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: add rt2x00_has_cap_* helpersGabor Juhos
The rt2x00 code directly accesses the 'cap_flags' field of 'struct rt2x00_dev' when checking presence of a given capability flag. The direct access needs long expressions which lowers readability of the code. Add a few helper functions which can be used to test device capabilities without directly accessing the cap_flags filed. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: cleanup indentation in rt2800.hGabor Juhos
Adjust whitespaces to move badly aligned constants to the right column. The patch contains no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-11Bluetooth: Declare ath3k_table[] and ath3k_blist_tbl[] as constMarcel Holtmann
The ath3k_table[] and ath3k_blist_tbl[] USB device tables can be declared as const. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-11Bluetooth: Declare bpa10x_table[] as constMarcel Holtmann
The bpa10x_table[] device table can be declared as const Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-11Bluetooth: Declare bfusb_table[] as constMarcel Holtmann
The bfusb_table[] device table can be declared as const Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-11Bluetooth: Declare btusb_table[] and blacklist_table[] as constMarcel Holtmann
The btusb_table[] and blacklist_table[] USB device tables can be declared as const. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-11Bluetooth: Remove pointless parameter check in vhci_send_frame()Marcel Holtmann
The hdev parameter of vhci_send_frame() is always valid. If it were not valid, then it would have crashed earlier in the call chain. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-11Bluetooth: Remove pointless parameter check in hci_uart_send_frame()Marcel Holtmann
The hdev parameter of hci_uart_send_frame() is always valid. If it were not valid, then it would have crashed earlier in the call chain. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-11Bluetooth: Remove pointless parameter check in dtl1_hci_send_frame()Marcel Holtmann
The hdev parameter of dtl1_hci_send_frame() is always valid. If it were not valid, then it would have crashed earlier in the call chain. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-11Bluetooth: Remove pointless parameter check in btuart_hci_send_frame()Marcel Holtmann
The hdev parameter of btuart_hci_send_frame() is always valid. If it were not valid, then it would have crashed earlier in the call chain. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-11Bluetooth: Remove pointless parameter check in btmrvl_send_frame()Marcel Holtmann
The hdev parameter of btmrvl_send_frame() is always valid. If it were not valid, then it would have crashed earlier in the call chain. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-11Bluetooth: Remove pointless parameter check in bt3c_hci_send_frame()Marcel Holtmann
The hdev parameter of bt3c_hci_send_frame() is always valid. If it were not valid, then it would have crashed earlier in the call chain. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-11Bluetooth: Remove pointless parameter check in bluecard_hci_send_frame()Marcel Holtmann
The hdev parameter of bluecard_hci_send_frame() is always valid. If it were not valid, then it would have crashed earlier in the call chain. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-11Bluetooth: Remove pointless parameter check in bfusb_send_frame()Marcel Holtmann
The hdev parameter of bfusb_send_frame() is always valid. If it were not valid, then it would have crashed earlier in the call chain. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-11Bluetooth: Add hdev parameter to hdev->send driver callbackMarcel Holtmann
Instead of masking hdev inside the skb->dev parameter, hand it directly to the driver as a parameter to hdev->send. This makes the driver interface more clear and simpler. This patch fixes all drivers to accept and handle the new parameter of hdev->send callback. Special care has been taken for bpa10x and btusb drivers that require having skb->dev set to hdev for the URB transmit complete handlers. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>