aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2012-03-07iwlwifi: make iwl_fill_probe_req staticJohannes Berg2-51/+49
This function is only used in iwl-scan.c, so if we move it up a little in the file it can be made static. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: clean up iwl-commands.hJohannes Berg2-10/+2
Do some cleanups here: * remove an unused prototype * remove some unused constants * clean up includes Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: don't include iwl-prph.h everywhereJohannes Berg5-2/+4
It's only needed in a few places. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: remove PA type configurationJohannes Berg2-20/+9
No need to have a special config variable for the PA type, we can just use the additional NIC config function to config the hardware correctly. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: remove priv from sharedJohannes Berg2-3/+0
Finally nothing needs to access priv from shared any more, so remove it. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: virtualize nic_configJohannes Berg5-7/+18
The nic_config sets uCode dependent register bits, so it must be virtual in the op_mode. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: move packet to transportJohannes Berg9-129/+103
The base packet structure will (hopefully) be the same for all transports, but what is in it differs. Remove the union of all the possible contents and move the packet itself into the transport header file. This requires changing all users of the union to just use pkt->data. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: move irq to PCIeJohannes Berg3-8/+8
Even if the variable might also be used by other transports, there's no need for anything outside of the transport itself to access it, so move it into the private area. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: move all uCode load variablesJohannes Berg5-9/+14
All variables related to uCode loading (the waitqueue and done indication) should be in the PCI-E transport's private data as this is transport specific. Move them there. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: move ucode_owner to privJohannes Berg8-13/+14
The transport doesn't really need to know as we can enforce it in the command wrapper. Move the ucode_owner variable into priv and do all enforcing there. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: abstract out notification wait supportJohannes Berg10-160/+314
This will be sharable, but needs to live in the op_mode as it is dependent on command processing. Make a library out of the notification wait code. Since I wrote all of the code originally and only Intel employees changed it, we can also relicense it to dual BSD/GPL. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: fix notification wait bugJohannes Berg1-3/+3
In "iwlwifi: consolidate the start_device flow" Emmanuel added the return if the fw isn't there but forgot to take into account that the struct for notification wait needs to be added only after the check -- fix that. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: constify remaining config dataJohannes Berg5-16/+19
The HW configuration settings base_params, ht_params and bt_params all should be const, make it so. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: put use_rts_for_aggregation into hw_paramsJohannes Berg6-9/+13
The hardware config ht_params shouldn't be modified, so copy the use_rts_for_aggregation parameter into hw_params and use/modify it there. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: use watchdog timeout from hw_paramsJohannes Berg2-3/+3
This is the version that can be modified, the config params should be read-only. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: keep plcp_delta_threshold in privJohannes Berg4-4/+9
The base_params shouldn't be writable, so keep a copy of this in priv that can be modified. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: remove max_txq_num from hw_paramsJohannes Berg1-1/+1
This can be used directly from the config now. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: remove num_of_queues module parameterJohannes Berg6-29/+0
This is a hardware parameter, so it shouldn't be configurable by the user. Users can disable aggregation (which is the only thing affected) with 11n_disable. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: clean up iwl-core.h inclusionsJohannes Berg2-3/+1
The transport doesn't need to include iwl-core.h any more. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: virtualize command queue full behaviourJohannes Berg5-8/+21
When the command queue is full, the transport will return -ENOSPC, but the reaction to that depends on the op_mode. Virtualize that, the DVM op_mode checks for CT-kill and restarts the hardware otherwise. We may be able to get rid of this callback by putting the behaviour check into the wrapper but that needs more careful evaluation. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: make tracing use device as identifierJohannes Berg6-86/+90
Tracing used the priv pointer as an identifier, which has the problem that we don't have it in all code, and also some people say no pointers should be "leaked" to userspace. Use the device name instead, it is more useful anyway. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: move status check functions out of sharedJohannes Berg4-58/+65
They are only used in the DVM op_mode. Also move the rfkill debug macros that depend on them. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: remove shadow_reg_enable from hw_paramsJohannes Berg6-8/+5
There's no need to copy shadow_reg_enable into hw_params since it is a pure hardware parameter that will never change, we can access it from the config directly. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: remove AMT check from transportJohannes Berg1-2/+2
As iwl_prepare_card_hw() is idempotent (and many cards support AMT anyway) there's no point in calling iwl_prepare_card_hw() only for AMT capable devices -- call it always and simplify the code that way. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: rename ucode.h to fw-file.hJohannes Berg2-4/+4
That name better reflects the contents of the file and the fact that it isn't related to iwl-ucode.c. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: move rfkill status handling out of transportJohannes Berg3-46/+22
The transport layer should only check the hardware RF kill status, not impose any policy or reaction based on it, so move that out of it into the op_mode. For now keep the restriction on loading firmware, that will have to be removed later. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: move mutex out of sharedJohannes Berg14-124/+122
Now the mutex no longer needs to be shared, so move it into iwl_priv. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: move lockdep assertion into DVMJohannes Berg2-3/+16
The fact that the mutex must be held is an implementation detail of DVM, but something has to ensure that no two synchronous cmds are submitted concurrently. Move the lockdep assertion into the DVM-specific code, but also make the transport abort if there are two concurrently commands. The assertion is much more useful though as the transport check can only catch it when it actually happens, while the assertion makes sure it can't possibly happen. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: move RF/CT kill check to command wrapperJohannes Berg2-15/+10
Currently, we cannot send any commands when the uCode is in RF or CT kill, but that will not be true for all new uCode versions, so we need to move the check into the uCode specific code. Also remove the duplicate rfkill check. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: add wrappers for command sendingJohannes Berg17-128/+70
Add wrappers to send commands from the DVM op-mode (which essentially consists of the current driver). This will allow us to move specific sanity checks there. Also, this removes iwl_trans_send_cmd_pdu() since that can now be taken care of in the DVM-specific wrapper. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: remove iwl-wifi.hJohannes Berg12-223/+148
This file was recently introduced, but then directly abused -- it contained private data that shouldn't have been used by anything but the implementation of firmware requests and some very core code. Now that it is no longer accessed by any code but the code in iwl-drv.c, we can dissolve it. Also rename the iwl_nic struct to iwl_drv to better reflect where and how it is used. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: split out firmware storeJohannes Berg19-163/+236
Through the driver, struct iwl_fw will store the firmware. Split this out into a separate file, iwl-fw.h, and make all other code use it. To do this, also move the log pointers into it, and remove the knowledge of "nic" from everything. Now the op_mode has a fw pointer, and (unfortunately) for now the shared data also needs to keep one for the transport to access dump the error log -- I think that will move later. Since I wanted to constify the firmware pointers, some more changes were needed. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07iwlwifi: move ucode loading to op_modeJohannes Berg13-160/+150
uCode loading belongs to the op_mode, as it is dependent on various things there and the commands sent during it are specific to it. Move the prototypes to iwl-agn.h to indicate this. To make this possible, also move all the calibration handling (which is op_mode dependent after all). Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07ath9k: fix signal strength reporting issuesFelix Fietkau1-5/+7
On A-MPDU frames, the hardware only reports valid signal strength data for the last subframe. The driver also mangled rx_stats->rs_rssi using the ATH_EP_RND macro in a way that may make sense for ANI, but definitely not for reporting to mac80211. This patch changes the code to calculate the signal strength from the rssi directly instead of taking the average value, and flag everything but the last subframe in an A-MPDU to tell mac80211 to ignore the signal strength entirely, fixing signal strength fluctuation issues reported by various users. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07ath9k: get rid of double queueing of rx frames on EDMAFelix Fietkau3-36/+28
Process rx status directly instead of separating the completion test from the actual rx status processing. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07ath9k: remove rssi/antenna information from recv debug statsFelix Fietkau2-38/+0
The way this is implemented (simply storing the last value) is absolutely worthless for debugging anything, and the same information is also available through the MAC sample feature, so there's no point in keeping this around. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07ath9k: make MAC sample statistics optionalFelix Fietkau4-6/+36
They're more expensive than some of the other debug options and only used in very rare situations, so it sometimes makes sense to disable them while leaving in debugfs support. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07ath9k_hw: use cold instead of warm reset on AR9280Felix Fietkau1-4/+10
Cold reset is more reliable for getting the hardware out of some specific stuck states. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-07ath6kl: make ath6kl_bmi_[read|write]_hi32() endian safeKalle Valo1-3/+10
ath6kl_bmi_[read|write]_hi32() did not have endian support, fix that. Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: fix too long linesKalle Valo3-26/+27
Found by checkpatch: drivers/net/wireless/ath/ath6kl/init.c:78: WARNING: line over 80 characters drivers/net/wireless/ath/ath6kl/init.c:397: WARNING: line over 80 characters drivers/net/wireless/ath/ath6kl/init.c:407: WARNING: line over 80 characters drivers/net/wireless/ath/ath6kl/htc.c:189: WARNING: line over 80 characters drivers/net/wireless/ath/ath6kl/htc.c:704: WARNING: line over 80 characters drivers/net/wireless/ath/ath6kl/htc.c:2452: WARNING: line over 80 characters Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: document all spinlocksKalle Valo5-0/+36
Also fixes quite a few checkpatch warnings like this: ath6kl/hif.h:226: CHECK: spinlock_t definition without comment Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: fix open paranthesis alignment in ath6kl_cfg80211_connect()Kalle Valo1-2/+8
ath6kl/cfg80211.c:462: CHECK: Alignment should match open parenthesis Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: fix error handling ath6kl_target_config_wlan_params()Kalle Valo1-28/+38
The error handling in ath6kl_target_config_wlan_params() was just weird, fix that. This also fixes some of the open parenthesis alignment issues reported by checkpatch. Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: add ath6kl_bmi_read_hi32()Kalle Valo2-16/+11
There are few 32 bit reads from the host interest area. Add ath6kl_bmi_read_hi32() to make it easier to do that. As code is cleaner this also fixes few checkpatch warnings. Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: add ath6kl_bmi_write_hi32()Kalle Valo2-76/+32
We have a lot of 32 bit writes to the host interest area and the code doing that is ugly. Clean that up by adding ath6kl_bmi_write_hi32(). This also fixes few checkpatch warnings. Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: remove multiple assignmentsKalle Valo1-4/+4
Found by checkpatch: drivers/net/wireless/ath/ath6kl/cfg80211.c:1295: CHECK: multiple assignments should be avoided drivers/net/wireless/ath/ath6kl/cfg80211.c:3000: CHECK: multiple assignments should be avoided Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: logical continuations should be on the previous lineKalle Valo4-15/+16
All found by checkpatch: ath6kl/wmi.c:1036: CHECK: Logical continuations should be on the previous line Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: alignment should match open parenthesisKalle Valo11-115/+115
Fix the issues which checkpatch found and were easy to fix. Especially callers of ath6kl_bmi_write() are tricky and that needs to be fixed separately. Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: fix checkpatch error with EPSTAT() macroKalle Valo1-3/+7
ath6kl/debug.c:739: ERROR: Macros with complex values should be enclosed in parenthesis Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: fix pointer styleKalle Valo1-2/+2
reported by checkpatch: ath6kl/core.h:748: ERROR: "foo * bar" should be "foo *bar" ath6kl/core.h:751: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Kalle Valo <[email protected]>