1
0
Fork 0
Commit Graph

243845 Commits (636c4598499eeacce0893dc8d91113b904bd531e)

Author SHA1 Message Date
Sujith Manoharan d67ee53393 ath9k_htc: Introduce new HTC API
A new routine that takes an endpoint explicitly is
introduced. The normal htc_send() now retrieves the endpoint
from the packet's private data. This would be useful
in TX completion when the endpoint ID would be required.
While at it, use a helper function to map the queue to endpoint.

Data/mgmt/beacon packets use htc_send(), while WMI comamnds
pass the endpoint to HTC.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:46 -04:00
Sujith Manoharan 8e86a54715 ath9k_htc: Fix TX queue management
Handle queue start/stop properly by maintaining
a counter to check if the pending frame count has
exceeded the threshold. Otherwise, packets would be
dropped needlessly. While at it, use a simple flag
to track queue status and use helper functions too.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:42 -04:00
Sujith Manoharan 3deff76095 ath9k_htc: Increase URB count for REG_IN pipe
Using a single URB for receiving WMI events is
insufficient, increase it to 64 to not lose
WMI events in high throughput situations.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:35 -04:00
Sujith Manoharan 16c56ae875 ath9k_htc: Add a new WMI event WMI_TXSTATUS_EVENTID
This event will be generated by the target for packet completions.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:30 -04:00
Sujith Manoharan e8e3860765 ath9k_htc: Sync MGMT/DATA packet headers with firmware
Add a new cookie field that would be filled by the host.
This can be used to match the TX status WMI event with
the appropriate packet.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:25 -04:00
Sujith Manoharan 15f6d6d52f ath9k_htc: Reduce TX queue size
The current max queue length of 1024 is quite large
and unnecessary. 256 suffices well enough even for high
throughput situations.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:21 -04:00
Sujith Manoharan 658ef04fd4 ath9k_htc: Move TX specific stuff to a separate structure
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:16 -04:00
Sujith Manoharan ee3fa1bdad ath9k_htc: Remove unused WMI_WLAN_TXCOMP_EVENTID
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:13 -04:00
Sujith Manoharan 0a8579f6b7 ath9k_htc: Sync struct ath9k_htc_cap_target with FW
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:08 -04:00
Sujith Manoharan e4c62506fc ath9k_htc: Sync struct ath9k_htc_target_vif with FW
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:23:03 -04:00
Sujith Manoharan b97c57ff3f ath9k_htc: Sync struct ath9k_htc_target_sta with FW
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:58 -04:00
Sujith Manoharan 40dc9e4b86 ath9k_htc: Use SKB's private area for TX parameters
For all packets sent through the USB_WLAN_TX_PIPE endpoint,
the private area of the SKB's tx_info can be used to store
driver-specific information. For packets sent through USB_REG_OUT_PIPE,
this will not make a difference since they are routed through a
separate routine that doesn't access the private region.

This would help in situations where TX information is required
in the URB callback.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:53 -04:00
Sujith Manoharan e723f3900c ath9k_htc: Remove unused WMI commands
WMI_TGT_TXQ_ENABLE_CMDID
WMI_HOST_ATTACH
WMI_DEBUG_INFO_CMDID
WMI_BEACON_UPDATE_CMDID
WMI_RESET_CMDID
WMI_RX_LINK_CMDID
WMI_STOP_DMA_RECV_CMDID

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:48 -04:00
Sujith Manoharan b1563a4c3d ath9k_htc: Fix RX length check
The length of the received SKB could be equal to
HTC_RX_FRAME_HEADER_SIZE in case of packets with phy/crc errors,
in which case they are dropped without being processed.
Fix this check so that the error counters are updated correctly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:44 -04:00
Sujith Manoharan 719c4cf6b1 ath9k_htc: Add RX error statistics
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:41 -04:00
Sujith Manoharan 8e42e4ba98 ath9k_htc: Move debug code to a separate file
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:37 -04:00
Sujith Manoharan f4c88991f5 ath9k_htc: Queue WMI events
Use a queue to handle WMI events and schedule a tasklet
to process the events. This fixes the race between the
WMI event ISR and the SWBA tasklet when the arrival of
WMI events in quick succession could overwrite the SWBA
data before the tasklet from a previous iteration could
have been scheduled. Also, drain the WMI queue properly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:33 -04:00
Sujith Manoharan b0a6ba983e ath9k_htc: Fix beacon miss under heavy load
Transmission of beacons becomes erratic when TX load
is high, since the latency involved in the generation
of a SWBA interrupt on the target to the actual sending
of a beacon is quite high for USB devices.

Fix this by adjusting the beacon response time.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:30 -04:00
Sujith Manoharan 7d547eb4bb ath9k_htc: Handle buffered frames in AP mode
Use the CAB endpoint to send buffered multicast or
broadcast frames after each SWBA event.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:26 -04:00
Sujith Manoharan 2493a547ee ath9k_htc: Configure the beacon queue
Set operating parameters (cwmin, cwmax) for the beacon queue
in AP mode.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:22 -04:00
Sujith Manoharan 9b674a0207 ath9k_htc: Add TSF adjust capability
In multi-interface mode, beacons/probe responses that are
sent out must have their timestamp field updated. Calculate
the TSF adjustment value for each beaconing interface and set it
in the frame properly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:18 -04:00
Sujith Manoharan 832f6a18fc ath9k_htc: Add beacon slots
Beacon transmission is now handled through a slot mechanism.
This allows multiple beaconing interfaces to be be present.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:14 -04:00
Sujith Manoharan 1c165c972b ath9k_htc: Fix WMI and beacon header
Match the beacon header with that of the firmware.
Also, the firmware reports the TSF for an SWBA, so
store it.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:11 -04:00
Sujith Manoharan 29bbfb2491 ath9k_htc: Add a WMI command to get the firmware version
Also, update the wiphy information and use the correct
device pointer when registering. This would fix ethtool.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:07 -04:00
Sujith Manoharan ce18f391aa ath9k_htc: Rename firmware
Since the new FW requires backward incompatible host driver changes,
rename the FW to allow older driver versions to work with the
older FW.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:22:03 -04:00
Sujith Manoharan 9efabad2b2 ath9k_htc: Remove AR7010 v1.0 support
All the AR7010 devices supoprted by ath9k_htc are based
on version v1.1, so remove support for v1.0.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:21:59 -04:00
Brian Cavagnolo d0805c1c57 mwl8k: use traffic threshold to decide when to start ampdu
Currently, ampdu stream is created on the first qos packet to an
HT sta. The overhead of setting up the BA session may not be
justified if the outgoing packet rate is minimal (e.g., ping). So
we only allow ampdu streams after seeing a critical number of
packets in an arbitrary one-second interval.

Based on work by Nishant Sarmukadam <nishants@marvell.com>

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:21:56 -04:00
Felix Fietkau 4114fa2146 mac80211: receive EAP frames from a station in an AP VLAN on the main AP
This makes it easier to handle moving stations to VLAN interfaces that are
part of a different bridge.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:21:52 -04:00
Gabor Juhos 8e26a03036 ath9k: introduce ATH9K_{PCI,AHB} config options
Currently ath9k only available in menuconfig if PCI bus
support is enabled. However the driver is required for
the built-in wireless MACs of the Atheros AR9130/AR9132
SoCs. These SoCs have no PCI controller, the wireless
MAC is connected to the AHB bus on them.

Introduce separated config options for the supported
buses, in order to allow building of ath9h without PCI
bus support.

As a bonus, this patch removes the cross-reference of
the ATHEROS_AR71XX option which is not present in the
kernel.

Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:21:34 -04:00
Nishant Sarmukadam 12488e01fb mwl8k: interrupt handling changes
We do not need to enable all the interrupts in mwl8k_probe_hw.
We need to enable only MWL8K_A2H_INT_OPC_DONE interrupt for sending
commands to the firmware. Keep the other interrupts masked in
mwl8k_probe_hw. Also, in mwl8k_start, where we expect other interrupts,
enable only those interrupts we are interested in.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 15:19:08 -04:00
Kevin Gan 9f72c1d977 Bluetooth: btmrvl: support Marvell Bluetooth device SD8787
The SD8787 firmware image is shared with mwifiex driver.
Whoever gets loaded first will be responsible for firmware
downloading.

Signed-off-by: Kevin Gan <ganhy@marvell.com>
Signed-off-by: Tristan Xu <xurf@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:20:05 -03:00
Gustavo F. Padovan b86ed368f1 Bluetooth: Check return value of hci_recv_stream_fragment()
It may return error and in this case we do add to the stats.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:20:04 -03:00
Jiejing Zhang 78b4a56c28 Bluetooth: hci_uart: check the return value of recv()
Check the return value of hu->proto->recv() in hci_uart_tty_receive()
the recv() may return error, check it, not add this to statistics.

Signed-off-by: Jiejing Zhang <jiejing.zhang@freescale.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:20:03 -03:00
Szymon Janc e1ba1f1546 Bluetooth: Fix Out Of Band pairing when mgmt interface is disabled
Use kernel stored remote Out Of Band data only if management interface
is enabled. Otherwise HCI_OP_REMOTE_OOB_DATA_NEG_REPLY was sent to
controller even if remote Out Of Band data was present in bluetoothd.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:20:02 -03:00
Gustavo F. Padovan 9f69bda6aa Bluetooth: Add proper handling of received LE data
Despite it works, handling through l2cap_data_channel() is wrongs.
That function should handle only connection oriented data.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:20:02 -03:00
Gustavo F. Padovan 0733119c0b Bluetooth: Clean up ath3k_load_firmware()
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:20:01 -03:00
Gustavo F. Padovan cd69a03af1 Bluetooth: Fix wrong comparison in listen()
We should check for the pi->scid there.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:20:00 -03:00
Gustavo F. Padovan 58d35f87ef Bluetooth: Move tx queue to struct l2cap_chan
tx_q is the queue used by ERTM mode.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:19:59 -03:00
Gustavo F. Padovan c916fbe45c Bluetooth: Remove unneeded uninitialized_vars()
That was unnecessary use of it.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:19:58 -03:00
Gustavo F. Padovan 49208c9c7b Bluetooth: Remove some sk references from l2cap_core.c
Change some BT_DBG messages and consequently remove some struct sock
declarations.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:19:57 -03:00
Gustavo F. Padovan 39d5a3ee35 Bluetooth: Move SREJ list to struct l2cap_chan
As part of moving all the Channel related operation to struct l2cap_chan.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-04-13 12:19:47 -03:00
John W. Linville 8962d87129 ath5k: improve comments for optimized tx descriptor setup
Comment the use of local variables to reduce the number of load/store
operations on uncached memory, in hopes of not losing this optimization
accidentally in the future.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13 08:49:10 -04:00
Vasanthakumar Thiagarajan 6f11c819d5 ath9k: Register id table for platform device
Currently the device id in the platform driver is hardcoded to an id
which is specific to AR9130/AR9132 SOCs as it supports only wmac (wireless mac)
of these SOCs. But this needs to be dynamic when we want to support different
wmac of SOCs. So add id_table to driver to make it extendable to more SOCs.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Acked-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:51 -04:00
Mark Davis b3ba44c6d1 rt2800usb: Add seven new USB IDs
Adds USB IDs for seven previously missing devices. Additionally, all
instances of 'Conceptronic' have been replaced by the OEM name.

Devices added are..
0411:01a2 - Buffalo WLI-UC-GNM, RT3070V
0586:341e - ZyXEL NWD2105, RT3070
13b1:002f - Linksys AE1000, RT3572
13b1:0031 - Cisco / Linksys AM10, RT3072
14b2:3c2c - Keebox W150NU / Alpha Networks WUS-N12, RT3070
157e:3013 - TRENDnet TEW-645UB, RT2770+RT2720
15a9:0012 - Airlink AWLL7025 / Gemtek WUBR-208N, RT2870+RT2850

Signed-off-by: Mark Davis <marked86@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:48 -04:00
Rajkumar Manoharan 901c1113da ath9k_hw: update AR9003 low_ob_db_tx_gain to improve spur performance
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:45 -04:00
Rajkumar Manoharan 5fb32faf82 ath9k_hw: update Ar9003 intervals to fix carrier leak
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:42 -04:00
Rajkumar Manoharan 2d05a0c2b4 ath9k_hw: Remove unused code in AR9287 eeprom
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:40 -04:00
Vasanthakumar Thiagarajan 3dfd7f6066 ath9k: Implement integer mode for AR9485
This fixes random disconnect.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:37 -04:00
Chaoming Li 228bdfca9a rtlwifi: rtl8192ce: Fix LED initialization
Driver rtl8192ce does not initialize the LED correctly.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:34 -04:00
roel f0bce44f5f ath9k: index out of bounds
Check whether index is within bounds before testing the element

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12 16:59:32 -04:00