summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mac80211: remove hw.conf.channel usage where possibleMichal Kazior2012-04-1313-40/+45
| | | | | | | | | | | | | | Removes hw.conf.channel usage from the following functions: * ieee80211_mandatory_rates * ieee80211_sta_get_rates * ieee80211_frame_duration * ieee80211_rts_duration * ieee80211_ctstoself_duration This is in preparation for multi-channel operation. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Remove BTCOEX initvalsSujith Manoharan2012-04-133-20/+0
| | | | | | | | | | | | | | | | | The MAX_TXPWR table for BTCOEX is not needed for AR9462. Programming these values to the HW results in undesirable behavior - for example, large number of delimiter/data underruns are seen in AES-CCMP mode. Also, registers like AR_PCU_MISC_MODE2 return 0xdeadbeef after the BTCOEX_MAX power table is programmed to the HW, and frames being transmitted end up being looped back to the RX engine, an example being beacon frames in IBSS mode. Remove this table for now - this fixes CCMP performance and general IBSS usage. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix an issue in ieee80211_tx_info count field managementLorenzo Bianconi2012-04-131-1/+7
| | | | | | | | | | | | I noticed a possible issue in the status count field management of the ieee80211_tx_info data structure. In particular, when the AGGR processing is employed, status.rates[].count is set just for the first frame and not for others belonging to the same burst, leading to wrong statistic data in the mac80211 debug file system. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: Add channel information to NL80211_CMD_GET_INTERFACEPontus Fuchs2012-04-134-3/+20
| | | | | | | | If the current channel is known, add frequency and channel type to NL80211_CMD_GET_INTERFACE. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rt2800: zero registers of unused TX ringsJakub Kicinski2012-04-131-0/+10
| | | | | | | | | This is needed if we take over after drivers which use those. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rt2800: initialize queues before giving up due to DMA errorJakub Kicinski2012-04-132-3/+5
| | | | | | | | | | | | | Don't immediately abort .start if DMA is busy before we initialize the queues. Some drivers do not deinitialize queues properly and we would fail to take over after them. This behaviour is consistent with legacy driver. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rt2800: add disabling of DMA before loading firmwareJakub Kicinski2012-04-131-0/+2
| | | | | | | | | Legacy driver disables DMA before loading firmware. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rt2800: introduce wpdma_disable functionJakub Kicinski2012-04-133-24/+19
| | | | | | | | | Introduce wpdma_disable function to simplify the code. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: protect ->scanning by mutex in ieee80211_work_work()Stanislaw Gruszka2012-04-131-3/+5
| | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: do not scan and monitor connection in parallelStanislaw Gruszka2012-04-134-19/+53
| | | | | | | | | Before we send probes in connection monitoring we check if scan is not pending. But we do that check without locking. Fix that and also do not start scan if connection monitoring is in progress. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'for-linville' of ↵John W. Linville2012-04-1385-2924/+3800
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx
| * Merge branch 'wl12xx-next' into for-linvilleLuciano Coelho2012-04-1285-2924/+3800
| |\
| | * wlcore/wl12xx: adapt FW status for multiple familiesArik Nemtsov2012-04-126-19/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add room for a private data struct at the end of the common FW status. Add a convenience "counters" struct inside the FW status. The wl12xx family does not currently use the FW status private data. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: add module param to prevent HW recoveryArik Nemtsov2012-04-121-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Allow preventing HW recovery from a module param. The driver/FW will remain stuck, to allow easier FW debugging. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: move identify firmware function to a lower driver opLuciano Coelho2012-04-124-26/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | Different chip families have different firmware versions, so we need to identify the firmware to enable quirks, reject the used version etc. in the lower drivers. This commit turns the fw_ver_quirks function into an identify_fw operation. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: set max_rx_agg_subframes in mac80211 according to HT confArik Nemtsov2012-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The max Rx aggregation subframes configured to FW must be the same number given to the upper layers (mac80211). Derive both from the same value, given in the conf struct. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: set HT capabilities per chip-familyArik Nemtsov2012-04-123-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | Set HT capabilities in the low-level HW driver. These are then used by wlcore when registering with mac80211. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add hw op to get rate-mask for AP-link in STA modeArik Nemtsov2012-04-124-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | In some chip-families, there are operating modes where we must mask-out certain Tx rates, and/or tweak the rate-mask with special HW-specific bits. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: use a single memory config and reset if using wl127xLuciano Coelho2012-04-124-17/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having two memory configuration sets, one for wl127x and one for wl128x, we can use only one which should be correctly set by the lower driver. The wl12xx driver now uses the wl128x memory config by default but changes it when if it identifies the wl127x chips. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: move extended radio configuration parameters to wl12xxLuciano Coelho2012-04-126-35/+86
| | | | | | | | | | | | | | | | | | | | | | | | The extended radio configuration parameters are only used by the wl127x chipsets, which are handled by the wl12xx driver. Move the rf configuration settings from wlcore to wl12xx. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: move runtime configuration struct to the lower driverLuciano Coelho2012-04-124-356/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | The configuration parameters vary with different chip families. Some of the parameters used only by some chip families, others should have different value depending on the family. Thus move the configuration values from wlcore to wl12xx. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: expand functionality of cmd_trigger HW opArik Nemtsov2012-04-123-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the cmd_trigger op to include the write of the command buffer. Also, instead of letting the lower driver access the cmd_box_addr element directly, we now pass the address in the trigger_cmd operation, so it doesn't have to be exported. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add hw op for vif initArik Nemtsov2012-04-124-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Add an op for family-specific vif initialization. Currently unused, but will be needed when wl18xx support is implemented. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add hw_init operationLuciano Coelho2012-04-1213-405/+499
| | | | | | | | | | | | | | | | | | | | | Move all the wl12xx-specific hw initialization procedures into a new hw_init op. Move some commands and ACX functions to wl12xx. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: turn no-Tx-align quirk into Tx-alignArik Nemtsov2012-04-125-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inverting the quirk flag to indicate Tx-alignment. This aligns it with the similar Rx-side quirk. The call to wl1271_set_block_size() decides whether SDIO block size alignment can be used or not. In case we're using SPI, we can't use the block size alignment, so the function returns false. So we set the quirk when wl1271_set_block_size() returns true and let the wl12xx lower driver unset the bit for wl127x (since it doesn't support this quirk). Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: split Tx completion to immediate/delayedArik Nemtsov2012-04-125-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One chip family employs immediate Tx completion, where knowledge of completed packets is given as part of the FW status. Another is only notified of Tx completion via the FW status, and has to read the completion status of the packets from a different location. Implement the wl12xx tx completion as a delayed Tx completion. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add hw op for getting rx packet data lengthArik Nemtsov2012-04-124-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a difference in the way chip families report the length of data in a single Rx packet. Abstract this into a HW op. Refactor the Rx data handling function to allocate the correct size for the data, and avoid trimming the skb. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add prepare_read hw op for Rx dataLuciano Coelho2012-04-124-29/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only difference in the read_data operations is that some chips need to prepare the data to be read before reading. So instead of having a mandatory read_data operation, we now have an option prepare_data operation that only needs to be implemented for chips that require it. In the wl12xx lower driver, we only set the prepare_data operation for wl127x chips. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add hw op for getting rx buffer data alignmentArik Nemtsov2012-04-125-16/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An aligned data buffer is such where the Ethernet portion of the packet starts on a 4-byte boundary. Some chip families support padding the Rx data buffer to achieve such alignment, others rely on the host to perform it. Implement the HW op for getting alignment state in wl12xx. Add support for HW-padded alignment in the Rx flow. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: introduce Rx block-size alignment HW quirkArik Nemtsov2012-04-123-14/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For chip-families that support aligned buffers in the Rx side. The Rx flow changes slightly for these chips. Currently these modifications rely on a hard-coded block-size of 256. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add global elements to convert hw-rates to standard ratesArik Nemtsov2012-04-127-108/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rates reported by HW can be different between chip families. Make the rate-to-idx translation tables private per family and use them in a common translation function. Add a global element to help determine which rates are HW HT-rates. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add hw op for setting frame length in tx_hw_descArik Nemtsov2012-04-124-32/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each chip family indicates the length of a frame to the HW differently. This includes different padding, alignment and other fields in the HW Tx descriptor. Put all wl12xx specific code in a hw op. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add hw op for setting blocks in hw_tx_descArik Nemtsov2012-04-124-14/+37
| | | | | | | | | | | | | | | | | | | | | | | | Each chip family has a slightly different Tx descriptor. Set the descriptor values according to family. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add hw op for calculating hw block count per packetArik Nemtsov2012-04-125-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | Each chip family has a different block size and calculates the total number of HW blocks differently, with respect to alignment. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: change GEM Tx-spare blocks per-vifArik Nemtsov2012-04-127-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The number of spare Tx blocks must be changed when the GEM cipher is engaged. Track set_key() operations to see if this is the case and change the Tx HW spare block count accordingly. Set the number of spare blocks for each operating mode from the low level driver. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: set the number of Tx descriptors per chip familyArik Nemtsov2012-04-126-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | Each chip family can have a different amount of Tx descriptors. These are set on init. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: create per-chip-family private storageArik Nemtsov2012-04-123-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | This storage is allocated in wlcore_alloc_hw and freed in free_hw. The size of the storage is determined by the low-level driver. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: add quirk to disable ELPLuciano Coelho2012-04-124-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELP is a very complicated process in the firmware. Due to its complexity, in some early firmware revisions, the ELP feature is disabled. To support this cases, this patch adds a quirk that disables ELP mode. When ELP is not supported, do not attempt to enter ELP when requested by the driver. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: remove some unnecessary event mailbox address readsLuciano Coelho2012-04-124-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | We were reading the even mailbox address three times, which was completely unnecessary and complicated things regarding partition selection. Remove the unnecessry reads and set the address for mailbox 1 and 2 after the first read. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add quirk for legacy NVS supportLuciano Coelho2012-04-123-23/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of checking the chip ID directly in the wlcore code to decide whether to use the new or the old NVS format, we now use a quirk that should be set by the low level driver to say that it needs to use the old format. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add command trigger and event ack operationsLuciano Coelho2012-04-125-19/+40
| | | | | | | | | | | | | | | | | | | | | Different chips may use different bits in the interrupt trigger register. Add operations to handle these differences. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: move MAC address reading operation to lower driverLuciano Coelho2012-04-123-50/+55
| | | | | | | | | | | | | | | | | | | | | | | | Different chip families have the factory MAC address written in different places. Add a new hardware operation to read the MAC address, if available. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: move top initialization to wl12xxLuciano Coelho2012-04-128-448/+425
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The top registers initialization is very specific to the actual hardware used, even the way in which we read from and write to the top registers varies from chip to chip. This patch moves all top registers initialization to wl12xx. Also add a boot op for the wlcore module to call at the right time and a few callbacks with the common called to be called from the lower drivers boot operations. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: move get_pg_ver to the lower driverLuciano Coelho2012-04-124-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | The PG version depends on the actual hardware. This commit moves the code used to read the PG version to the lower driver, by adding the get_pg_ver hardware operation. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: add chip-specific identify chip operationLuciano Coelho2012-04-129-69/+99
| | | | | | | | | | | | | | | | | | | | | | | | Move the code that identifies the chip ID and selects the appropriate firmware to an operation implemented by the lower driver. Also move the quirks definitions into wlcore.h and rename to WLCORE_QUIRK_*. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: implement chip-specific register tablesLuciano Coelho2012-04-1220-355/+468
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add register tables support in wlcore, add some new IO functions to read and write to chip-specific register and data addresses. Move some common register values from wl12xx to wlcore and add the registers table to wl12xx. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore/wl12xx: implement chip-specific partition tablesLuciano Coelho2012-04-128-139/+168
| | | | | | | | | | | | | | | | | | | | | | | | Add partition tables to wlcore, move and reorganize partition setting functions. Move wl12xx partition table to use the wlcore partition table instead. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wl12xx/wlcore: move wl1271 struct to wlcore and add opsLuciano Coelho2012-04-1222-230/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | In order to add chip-specific operations and prepare for future elements that need to be set by the lower driver, move the wl1271 structure to the wlcore.h file and add an empty placeholder for the operations structure. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wl12xx/wlcore: initial split of probeLuciano Coelho2012-04-123-20/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | We need to set some parameters (eg. partition and register tables) during probe of the lower driver, so split the probe function, leaving most of it in wlcore, but moving the hw struct allocation to the lower driver. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wl12xx/wlcore: spin out the wl12xx probe from wlcore to a new wl12xxLuciano Coelho2012-04-129-64/+130
| | | | | | | | | | | | | | | | | | | | | Create a new small wl12xx module that only contains the probe functions and depends entirely on wlcore otherwise. Signed-off-by: Luciano Coelho <coelho@ti.com>