aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-09-01NFC: trf7970a: Document the 'en2-rf-quirk' DT propertyMark A. Greer
Current versions of the trf7970a have an erratum where the EN2 pin must be kept low. If it isn't kept low, it will generate an RF field even when in passive target mode. To work around this issue, create the 'en2-rf-quirk' device tree property to indicate that the trf7970a that the driver is using has this erratum. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-01NFC: trf7970a: Add quirk to keep EN2 lowMark A. Greer
A bug has been discovered in the trf7970a where it will generate an RF field even in passive target mode when EN2 is asserted. To work around this, add support for the 'en2-rf-quirk' device tree property which indicates that EN2 must remain low. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-01NFC: trf7970a: Document the 'irq-status-read-quirk' DT propertyMark A. Greer
The mechanism for specifying that the trf7970a being used by the driver has the "IRQ Status Read" erratum has been changed to a device tree property ('irq-status-read-quirk'). Document the new device tree property. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-01NFC: trf7970a: Move IRQ Status Read quirk to device treeMark A. Greer
The quirk indicating whether the trf7970a has the "IRQ Status Read" erratum or not is currently implemented using the 'driver_data' member of the 'spi_device_id' structure. That requires the driver to be modified to turn the quirk off when a version of the trf7970a that doesn't have the erratum is being used. To fix that, create a new device tree property called 'irq-status-read-quirk' that indicates that the trf7970a being used has the erratum. While at it, rename 'TRF7970A_QUIRK_IRQ_STATUS_READ_ERRATA' to 'TRF7970A_QUIRK_IRQ_STATUS_READ' to make it less of an eyesore. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-01NFC: trf7970a: Document the 'vin-voltage-override' DTS propertyMark A. Greer
The trf7970a driver recently had support for the 'vin-voltage-override' property added to it. This property is used to override the value given by the regulator subsystem for the VIN pin's voltage. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-01NFC: trf7970a: Add VIN voltage override supportMark A. Greer
The trf7970a driver uses the voltage from the power/regulator subsystem to determine what the voltage on the VIN pin is. Normally, this is the right thing to do but sometimes the board that the trf7970a is on may change the voltage. This is the case for the trf7970atb board from Texas Instruments where it boosts the VIN voltage from 3.3V to 5V (see http://www.ti.com/tool/trf7970atb). To handle this, add support for the 'vin-voltage-override' device tree property which overrides the voltage value given by the regulator subsystem. When the DT property is not present, the value from the regulator subsystem is used. The value of 'vin-voltage-override' is in uVolts. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-08-31NFC: digital: Add Inititor-side PSL supportMark A. Greer
In order to operate at the fasted bit rate possible, add initiator-side support for PSL REQ while in P2P mode. The PSL REQ will switch the RF technology to 424F whenever possible. Reviewed-by: Thierry Escande <thierry.escande@linux.intel.com> Tested-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-08-28carl9170: tx: Replace rcu_assign_pointer() with RCU_INIT_POINTER()Andreea-Cristina Bernat
According to RCU_INIT_POINTER()'s block comment 3.a, it can be used if "3. The referenced data structure has already been exposed to readers either at compile time or via rcu_assign_pointer() -and- a. You have not made -any- reader-visible changes to this structure since then". This case fulfills the conditions above because between the rcu_dereference() call (cvif = rcu_dereference(ar->beacon_iter);) and the rcu_assign_pointer() call there is no update of the "cvif" variable. Therefore, this patch makes the replacement. The following Coccinelle semantic patch was used: @@ identifier v; @@ v = rcu_dereference(...); ... when != rcu_dereference(...); when != v = ...; when != (<+...v...+>)++; when != \(memcpy\|memset\)(...); ( - rcu_assign_pointer + RCU_INIT_POINTER (..., v); | if(...) { ... when != v = ...; - rcu_assign_pointer + RCU_INIT_POINTER (..., v); ... when any } ) Because there are cases where between a “rcu_dereference()” call and a “rcu_assign_pointer()” call might be updates of the value that interests us, the Coccinelle semantic patch ignores them and replaces with "RCU_INIT_POINTER()" only when the update is not happening. Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Fix channel context timerSujith Manoharan
Setup the channel context correctly. Not doing this was causing beacon loss in a P2P-GO/STA concurrent setup. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add more debug statements for channel contextSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Disable fastcc for channel context modeSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28rt2x00: support Ralink 5362.Canek Peláez Valdés
Signed-off-by: Canek Peláez Valdés <canek@ciencias.unam.mx> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Fix channel context creationSujith Manoharan
If a new context is being added in addition to the current one, then send the ASSIGN event to abort a running scan since the addition of a context is usually followed by VIF assignment and further operations. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Fix interface limitsSujith Manoharan
There is no reason why managed/p2p interfaces have to be limited to one. IBSS is the only type that needs a restriction. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Print the event/state in ath_chanctx_eventSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add new chanctx eventsSujith Manoharan
This will be useful in handling addition/change of new channel contexts. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Fix ath_chanctx_get()Sujith Manoharan
Move it inside a CONFIG_ATH9K_CHANNEL_CONTEXT ifdef since it is not needed otherwise. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Move ath9k_beacon_add_noa to channel.cSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Remove redundant ifdefSujith Manoharan
This was introduced in an earlier patch to handle a compilation warning, but since the channel context code has been mostly isolated, this is not required now. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Fix channel context variables in ath_softcSujith Manoharan
chanctx_work and next_chan are required only when CONFIG_ATH9K_CHANNEL_CONTEXT is enabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Fix 'offchannel' in ath_softcSujith Manoharan
Finally move the 'offchannel' instance in ath_softc inside a CONFIG_ATH9K_CHANNEL_CONTEXT cage. The offchannel usage in ath9k_calculate_iter_data() is closed off with an ifdef for now, since the state/opmode calculation is common for both the channel context mode and the normal mode. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Fix function argument typeSujith Manoharan
ath9k_vif_iter() was earlier used as an iterator routine when calling a mac80211 utility. This is no longer the case and hence we can mention the argument type explicitly. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Use ath_chanctx_check_active properlySujith Manoharan
ath_chanctx_check_active() is required only when channel contexts are used. Make sure that it is not called in normal usage. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add ath9k_offchannel_initSujith Manoharan
This patch adds a routine to setup the offchannel instance in ath_softc. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add ath9k_chanctx_wake_queuesSujith Manoharan
Introduce a function that handles queues in channel context mode. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add wrappers for beacon eventsSujith Manoharan
Using these wrappers allows us to move the 'sched' variable in ath_softc inside CONFIG_ATH9K_CHANNEL_CONTEXT. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Fix function declarationsSujith Manoharan
These routines are required only when CONFIG_ATH9K_CHANNEL_CONTEXT is enabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Fix channel context eventsSujith Manoharan
Check if channel context usage is enabled before calling ath_chanctx_event() from various parts of the driver. Also, make sure that ath_chanctx_event() is compiled only when CONFIG_ATH9K_CHANNEL_CONTEXT is enabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Make ath_chanctx_switch staticSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Make ath_chanctx_get_oper_chan staticSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Make ath_chanctx_offchan_switch staticSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Conditionally compile more functionsSujith Manoharan
Use CONFIG_ATH9K_CHANNEL_CONTEXT to exclude: ath_scan_complete() ath_roc_complete() ath_offchannel_next() ath_scan_next_channel() ath_scan_channel_duration() Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Exclude more functionsSujith Manoharan
Use CONFIG_ATH9K_CHANNEL_CONTEXT to exclude more functions: ath_offchannel_channel_change() ath_scan_channel_start() ath_scan_send_probe() Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Conditionally compile a few functionsSujith Manoharan
Exclude these functions when CONFIG_ATH9K_CHANNEL_CONTEXT is not enabled: ath_chanctx_send_vif_ps_frame() ath_chanctx_send_ps_frame() ath_chanctx_defer_switch() ath_chanctx_set_next() Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Cleanup mgd_prepare_tx callbackSujith Manoharan
Rename the callback from ath9k_chanctx_force_active() to ath9k_mgd_prepare_tx(). Also, move it to main.c and group it with the other callbacks. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Make ath_chanctx_work staticSujith Manoharan
Also compile it conditionally based on CONFIG_ATH9K_CHANNEL_CONTEXT. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add a routine to tear down channel contextsSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add a routine for initializing channel contextsSujith Manoharan
Setup the offchannel/sched timers and the chanctx work inside the new function. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28carl9170: Remove redundant protection checkAndreea-Cristina Bernat
The carl9170_op_ampdu_action() function is used only by the mac80211 framework. Since the mac80211 already takes care of checks and properly serializing calls to the driver's function there is no need for the driver to do the same thing. Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Isolate ath9k_use_chanctx module parameterSujith Manoharan
This patch ensures that the module parameter "use_chanctx" is visible only when CONFIG_ATH9K_CHANNEL_CONTEXT is selected. Also register the channel context callbacks with mac80211 only when it is explicitly enabled and compile them out of the driver when CONFIG_ATH9K_CHANNEL_CONTEXT is not selected. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Isolate P2P powersave routinesSujith Manoharan
Use CONFIG_ATH9K_CHANNEL_CONTEXT to conditionally compile P2P-PS code. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Move P2P functions to channel.cSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add a config option for channel contextSujith Manoharan
Channel contexts are supported only for P2P right now, so make sure that the 'normal' path remains unaffected by using a config option. This will also reduce the size of the driver. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add debug informationSujith Manoharan
Add a few statements to debug channel context operation. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Move channel operations to channel.cSujith Manoharan
This reduces clutter in main.c Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Handle failure to allocate HW timerSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add a debug level for channel contextSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath5k: remove redundant null check before kfree()Bob Copeland
kfree() null-checks its argument. Found by smatch. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath5k: ensure led name is null terminatedBob Copeland
Add the missing null termination after strncpy(). This isn't actually a buffer overflow in this case since we use snprintf() appropriately to fill the buffer passed by the caller, but in the interest of not turning this into a bug down the road, go ahead and force termination here. Found by Coverity. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath5k: drop useless comparisonBob Copeland
rxs->rate_idx is unsigned, so it will always be >= 0. Found by Coverity. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>