aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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-07mac80211: Fix potential null pointer dereferencingAshok Nagarajan1-6/+7
The patch "{nl,cfg,mac}80211: Implement RSSI threshold for mesh peering" has a potential null pointer dereferencing problem. Thanks to Dan Carpenter for pointing out. This patch will fix the issue. Signed-off-by: Ashok Nagarajan <[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-07mac80211: Filter duplicate IE idsPaul Stewart4-22/+141
mac80211 is lenient with respect to reception of corrupted beacons. Even if the frame is corrupted as a whole, the available IE elements are still passed back and accepted, sometimes replacing legitimate data. It is unknown to what extent this "feature" is made use of, but it is clear that in some cases, this is detrimental. One such case is reported in http://crosbug.com/26832 where an AP corrupts its beacons but not its probe responses. One approach would be to completely reject frames with invaid data (for example, if the last tag extends beyond the end of the enclosing PDU). The enclosed approach is much more conservative: we simply prevent later IEs from overwriting the state from previous ones. This approach hopes that there might be some salient data in the IE stream before the corruption, and seeks to at least prevent that data from being overwritten. This approach will fix the case above. Further, we flag element structures that contain data we think might be corrupted, so that as we fill the mac80211 BSS structure, we try not to replace data from an un-corrupted probe response with that of a corrupted beacon, for example. Short of any statistics gathering in the various forms of AP breakage, it's not possible to ascertain the side effects of more stringent discarding of data. Signed-off-by: Paul Stewart <[email protected]> Cc: Sam Leffler <[email protected]> Cc: Eliad Peller <[email protected]> Acked-by: Johannes Berg <[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]>
2012-03-07ath6kl: Set optimal listen intvl,bmiss,scan params while going to wow suspendRaja Mani4-1/+90
* In order to save the target power in WOW suspend state, configure the best optimal values for the below parameters, - listen interval. - beacon miss interval. - scan parameters. Default values for above attributes are reverted in wow resume operation. * The default listen interval is set before the host issue connect request. * New function is added to configure beacon miss count. kvalo: minor changes to fix open parenthesis alignment Signed-off-by: Raja Mani <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: Maintain the listen interval per VIF specificRaja Mani5-14/+16
Firmware has the option to support the listen interval per vif specific. Fix this. Listen interval can be set by the TUs or by the number of beacons. Current code enables the user to configure the listen interval in the unit of 'number of beacons' using debugfs entry "listen_interval". Going forward, we need to alter the listen interval in the unit of TUs to get good power numbers while going to WOW suspend/resume. Allowing the user to change the listen interval in the unit of "number of beacons" in debugfs and changing listen interval in wow suspend/resume in the unit of time (TUs) would lead us to confuse. This patch make sures the listen interval is changed only in the unit of time (TUs). Signed-off-by: Raja Mani <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: Check wow state before sending control and data pktRaja Mani4-3/+44
Below two scenarios are taken care in this patch which helped to fix the firmware crash during wow suspend/resume. * TX operation (ctrl tx and data tx) has to be controlled based on suspend state. i.e, with respect to WOW mode, control packets are allowed to send from the host until the suspend state goes ATH6KL_STATE_WOW and the data packets are allowed until WOW suspend operation starts. * Similarly, wow resume is NOT allowed if WOW suspend is in progress. Signed-off-by: Raja Mani <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-03-07ath6kl: Add provision to define suspend policy in disconnected state.Raja Mani4-8/+25
It gives flexibility to the user to define suspend policy when the suspend mode is set to WOW and the device is in disconnected state at the time of suspend. New module parameter wow_mode is added to get the choice from the user. This parameter is valid only if the module parameter suspend_mode is set to WOW. To force WOW in connected state and cut power in disconnected state: suspend_mode=0x3 wow_mode=0x1 To force WOW in connected state and deep sleep in disconnected state (this is also the default wow_mode): suspend_mode=0x3 wow_mode=0x2 If there is no value specified to wow_mode during insmod, deep sleep mode will be tried in the disconnected state. kvalo: clarified commit log Signed-off-by: Raja Mani <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-03-06NFC: NCI code identation fixesSamuel Ortiz5-127/+116
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Core code identation fixesSamuel Ortiz6-74/+66
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: LLCP code identation fixesSamuel Ortiz4-93/+100
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Fix LLCP sockets releasing pathSamuel Ortiz2-12/+26
The socket local pointer needs to be set to NULL when the adapter is removed or the MAC goes down. If the socket release code is called after such an event, the socket reference count still needs to be decreased in order for the socket to eventually be freed. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Remove the rf mode parameter from the DEP link up routineSamuel Ortiz6-42/+24
When calling nfc_dep_link_up, we implicitely are in initiator mode. Which means we also can provide the general bytes as a function argument, as all drivers will eventually request them. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: SN is not an invalid GT valueSamuel Ortiz1-0/+2
We just don't do anything with it when parsing the general bytes. We handle it from the CONNECT reception code. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Unlink LLCP child sockets from llcp_sock_releaseSamuel Ortiz1-13/+3
The parent socket (the bound one) could be freed before its children, so we should unlink the children without trying to reach it through the parent. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Export NFCID when detecting a p2p target with pn533Samuel Ortiz1-0/+2
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Export Jewel/Topaz ID from pn533Samuel Ortiz1-0/+2
The jewel ID is the NFCID1 for Topaz NFC tags. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Export sensf from pn533Samuel Ortiz1-0/+3
sensf is the detection response for Felica NFC tags. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Fragment LLCP I framesSamuel Ortiz1-14/+43
Based on the receiver MIU, we have to fragment the frame to be transmitted. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Set MIU and RW values from CONNECT and CC LLCP framesSamuel Ortiz2-3/+49
We use the maximum values for the LLCP Maximum Information Unit and Receive Window Size. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Send LLCP RR frames to acknowledge received I framesSamuel Ortiz3-3/+33
In order to acknowledge an I frame, we have to either queue pending local I frames or queue a receiver ready frame. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Set the right LLCP N(R) value for I framesSamuel Ortiz1-1/+1
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Clear LLCP SDPs whan MAC goes downSamuel Ortiz1-0/+13
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Clear pn533 target structureSamuel Ortiz1-0/+2
The polled target structure should be memset to 0 in order to avoid sel_res and sens_res garbage. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Fix bitops usage in LLCPSamuel Ortiz1-10/+10
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: LLCP socket sendmsg implemetationSamuel Ortiz3-1/+62
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Handle Receiver Not Ready LLCP frameSamuel Ortiz1-5/+11
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Factorize the I frame queueing routineSamuel Ortiz2-17/+29
This one will be called from the I frame command sending. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Add device powered netlink attributeSamuel Ortiz2-0/+4
For user space to know if a device is up or down. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06NFC: Export NFCID1 from pn533Samuel Ortiz1-0/+2
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06bcma: add support for on-chip OTP memory used for SPROM storageArend van Spriel2-21/+115
Wireless Broadcom chips can have either their SPROM data stored on either external SPROM or on-chip OTP memory. Both are accessed through the same register space. This patch adds support for the on-chip OTP memory. Tested with: BCM43224 OTP and SPROM BCM4331 SPROM BCM4313 OTP This patch is in response to linux-wireless thread [1]. [1] http://article.gmane.org/gmane.linux.kernel.wireless.general/85426 Tested-by: Saul St. John <[email protected]> Tested-by: Rafal Milecki <[email protected]> Tested-by: Hauke Mehrtens <[email protected]> Cc: Larry Finger <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06bcma: return error in bcma_sprom_get() when fallback failsArend van Spriel1-10/+17
When not SPROM is available a fallback mechanism is used. However, when that fails the code currently continues. This patch assures that the bcma_sprom_get() function aborts when that happens. Cc: Rafal Milecki <[email protected]> Cc: Hauke Mehrtens <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>