summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-11-30bcma: handle return value of pci_assign_resourceHauke Mehrtens
This fixes the following warning: CC drivers/bcma/driver_pci_host.o drivers/bcma/driver_pci_host.c: In function 'bcma_core_pci_fixup_addresses': drivers/bcma/driver_pci_host.c:555:23: error: ignoring return value of 'pci_assign_resource', declared with attribute warn_unused_result [-Werror=unused-result] Reported-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-26p54: improve TSF timestamp precisionChristian Lamparter
The LMAC API states that the TSF clock value of every rx'ed frame is a "usec accurate timestamp of the hardware clock at the end of frame (before OFDM SIFS EOF padding)". Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-26iwlwifi: initialize rx_statusJohannes Berg
The vendor radiotap patch added a few fields to struct ieee80211_rx_status that need to be zero, initialize the struct instead of using whatever was left on the stack. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Kalle Valo <kvalo@adurom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-26iwlegacy: initialize rx_statusJohannes Berg
The vendor radiotap patch added a few fields to struct ieee80211_rx_status that need to be zero, initialize the struct instead of using whatever was left on the stack. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-26brcmsmac: Add __printf verification to logging prototypesJoe Perches
Adding __printf helps spot format and argument mismatches. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-26Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2012-11-26mac80211_hwsim: remove printing scan configJohannes Berg
The frequencies will be printed when actually doing the scan, and the IEs can be captured on the hwsim0 monitor. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-11-26mac80211_hwsim: advertise VHT supportJohannes Berg
If the number of channels is > 1, which means that hwsim will use mac80211 channel contexts, it can also advertise VHT support. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-11-26mac80211: convert to channel definition structJohannes Berg
Convert mac80211 (and where necessary, some drivers a little bit) to the new channel definition struct. This will allow extending mac80211 for VHT, which is currently restricted to channel contexts since there are no drivers using that which makes it easier. As I also don't care about VHT for drivers not using the channel context API, I won't convert the previous API to VHT support. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-11-26nl80211/cfg80211: support VHT channel configurationJohannes Berg
Change nl80211 to support specifying a VHT (or HT) using the control channel frequency (as before) and new attributes for the channel width and first and second center frequency. The old channel type is of course still supported for HT. Also change the cfg80211 channel definition struct to support these by adding the relevant fields to it (and removing the _type field.) This also adds new helper functions: - cfg80211_chandef_create to create a channel def struct given the control channel and channel type, - cfg80211_chandef_identical to check if two channel definitions are identical - cfg80211_chandef_compatible to check if the given channel definitions are compatible, and return the wider of the two This isn't entirely complete, but that doesn't matter until we have a driver using it. In particular, it's missing - regulatory checks on the usable bandwidth (if that even makes sense) - regulatory TX power (database can't deal with it) - a proper channel compatibility calculation for the new channel types Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-11-26cfg80211: pass a channel definition structJohannes Berg
Instead of passing a channel pointer and channel type to all functions and driver methods, pass a new channel definition struct. Right now, this struct contains just the control channel and channel type, but for VHT this will change. Also, add a small inline cfg80211_get_chandef_type() so that drivers don't need to use the _type field of the new structure all the time, which will change. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-11-26cfg80211: remove remain-on-channel channel typeJohannes Berg
As mwifiex (and mac80211 in the software case) are the only drivers actually implementing remain-on-channel with channel type, userspace can't be relying on it. This is the case, as it's used only for P2P operations right now. Rather than adding a flag to tell userspace whether or not it can actually rely on it, simplify all the code by removing the ability to use different channel types. Leave only the validation of the attribute, so that if we extend it again later (with the needed capability flag), it can't break userspace sending invalid data. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-11-21rtl8723ae: fix build break from "mac80211: support RX_FLAG_MACTIME_END"John W. Linville
CC drivers/net/wireless/rtlwifi/rtl8723ae/trx.o drivers/net/wireless/rtlwifi/rtl8723ae/trx.c: In function ‘rtl8723ae_rx_query_desc’: drivers/net/wireless/rtlwifi/rtl8723ae/trx.c:324:21: error: ‘RX_FLAG_MACTIME_MPDU’ undeclared (first use in this function) drivers/net/wireless/rtlwifi/rtl8723ae/trx.c:324:21: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [drivers/net/wireless/rtlwifi/rtl8723ae/trx.o] Error 1 Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2012-11-21Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Conflicts: drivers/net/wireless/iwlwifi/pcie/trans.c
2012-11-21brcmsmac: Remove stray argument from debug macroSeth Forshee
One of the debug macro invocations ended up with a stray 0 argument where the format string should be. Remove it. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21brcmsmac: Remove unused wlc_prio2prec_map and _BRCMS_PREC_* constantsSeth Forshee
Fixes sparse warning: drivers/net/wireless/brcm80211/brcmsmac/main.c:308:10: sparse: symbol 'wlc_prio2prec_map' was not declared. Should it be static? Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21ath9k: Remove 'stations' debugfs fileSujith Manoharan
The 'stations' debugfs file has multiple issues. It doesn't scale to an arbitrary number of associated stations and allocating 64K is not elegant either. Now that changes have been made in mac80211 to support dynamic creation/deletion of driver-specific debugfs files on station addition/removal, remove this file and make use of the mac80211 hooks (which will be done in a sebsequent patch). Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21ath9k: Fix rate control debuggingSujith Manoharan
Update the rate statistics only when debugfs has been enabled in ath9k and mac80211 and move the stat() functions under proper conditionals. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21ath9k: Fill remove_sta_debugfs() callbackSujith Manoharan
Remove the rate control statistics debugfs file properly via remove_sta_debugfs(). Also, check for both MAC80211_DEBUGFS and ATH9K_DEBUGFS config options. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21ath9k: Add a debugfs file to dump queue statisticsSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21ath9k: Fix the 'xmit' debugfs fileSujith Manoharan
The 'xmit' debugfs file has become big and unwieldy, fix multiple issues with its usage: * Store TX counters/statistics only for the 4 Access Categories. Use IEEE80211_NUM_ACS instead of ATH9K_NUM_TX_QUEUES. * Move various utility macros to debug.h, they can be reused elsewhere. * Remove tx_complete_poll_work_seen. * Remove code that accesses various internal queue-specific variables without any locking whatsoever. HW/SW queue details will be handled in a subsequent patch. * Do not print internal values like txq_headidx and txq_headidx. They were mostly unused anyway, considering code like: PRX("txq_tailidx: ", txq_headidx); * Handle 'txprocdesc' for EDMA too. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21ath9k/ath9k_htc: Remove WME macrosSujith Manoharan
Use the macros provided by mac80211 and remove redundant declarations inside the drivers. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21net/wireless: ipw2200: introduce ipw_set_geo functionStanislav Yakovlev
Move regulatory domain initialization code to a separate function. Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21ath9k: stomp audio profiles on weak signal strengthRajkumar Manoharan
On lower WLAN signal strength, WLAN downlink traffic might suffer from retransmissions. At the mean time, playing SCO/A2DP profiles is affecting WLAN stability. In such scenario, by stomping SCO/A2DP BT traffic completely for a BTCOEX period, gives WLAN traffic an oppertunity to recover PHY rate. It also improves WLAN stability at lower RSSI without sacificing BT traffic. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21ath9k: Fix MCI reset in BT cal_reqRajkumar Manoharan
This patch reverts the commit "ath9k_hw: Wait BT calibration to complete" and bail out from MCI interrupt routine for chip reset. The above commit stalls the WLAN TCP traffic while bringing up and down the BT interface iteratively. Fixing this properly by queueing up chip reset and bailing out properly from tasklet routine. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21ath9k: Process FATAL interrupts at firstRajkumar Manoharan
FATAL and WATCHDOG interrupts should be processed first followed by others. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-21Merge branch 'for-upstream' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
2012-11-21Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c drivers/net/wireless/iwlwifi/pcie/tx.c
2012-11-21iwlwifi: remove effectless assignmentEmmanuel Grumbach
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-11-20brcmfmac: include linux/vmalloc.h from usb.cJohn W. Linville
This avoids build failures on some architectures... Signed-off-by: John W. Linville <linville@tuxdriver.com> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Arend van Spriel <arend@broadcom.com>
2012-11-20brcmfmac: check return from kzalloc in brcmf_fweh_process_eventJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Arend van Spriel <arend@broadcom.com>
2012-11-20brcmsmac: Remove some noisy and uninformative debug messagesSeth Forshee
These messages clutter up the trace buffer without adding any useful information. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Add tracepoint for AMPDU session informationSeth Forshee
Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Add tracepoint for macintstatusSeth Forshee
Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Improve tx trace and debug supportSeth Forshee
Add the brcmsmac_tx trace system for tx debugging. Existing code to dump tx status and descriptors are converted to using tracepoints, allowing for more efficient collection and post-processing of this data. These tracepoints are placed to collect data for all tx frames instead of only on errors. Logging of tx errors is also improved. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Add brcms_dbg_ht() debug macroSeth Forshee
Also convert relevant messages to use this macro. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Add brcms_dbg_dma() debug macroSeth Forshee
Also convert relevant messages to use this macro. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Add brcms_dbg_int() debug macroSeth Forshee
Also convert relevant message to use this macro. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Add rx and tx debug macrosSeth Forshee
Also convert relevant messages over to use thses macros. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Add brcms_dbg_mac80211() debug macroSeth Forshee
This macro is used for messages related to the 802.11 MAC layer. Relevant messages are also converted to use this macro. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Use debug macros for general error and debug statementsSeth Forshee
Convert most uses of wiphy_* and pr_* for general error and debug messages to use the internal debug macros instead. Most code used only for initialization still use wiphy_err(), as well as some locations which are executed too early to use the debug macros. Some debug messages which are redundant or not useful are removed. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Add support for writing debug messages to the trace bufferSeth Forshee
Add a new brcmsmac_msg trace system to enable writing of debug messages to the trace buffer, and add brcms_* macros for storing device debug messages in the trace buffer in addition to the printk log buffer. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Add module parameter for setting the debug levelSeth Forshee
The debug level can be set by passing debug=... to brcmsmac whenever CONFIG_BRCMDBG is enabled. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcm80211: Convert log message levels to debug levelsSeth Forshee
In preparation for enhancements to debug and trace support, convert the message levels to debug levels which will be used for enabling categories of debug messages. The two message levels are little-used anyway and are combined into the BRCM_DL_INFO debug level. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcm80211: Allow trace support to be enabled separately from debugSeth Forshee
Since the runtime overhead of trace support is small when tracing is disabled, users may be interested in turning on trace support while leaving other debug features off. Add a new config option named CONFIG_BRCM_TRACING for this purpose. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Reduce number of entries in tx DMA ringsSeth Forshee
Currently up to 256 frames can be queued for each DMA ring. This is excessive, and now that we have better flow control we can get by with less. Experimentation has shown 64 to work well. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Use correct descriptor count when calculating next rx descriptorSeth Forshee
nextrxd() is calling txd(), which means that the tx descriptor count is used to determine when to wrap for determining the next ring buffer entry. This has worked so far since the driver has been using the same number of rx and tx descriptors, but it's obviously going to be a problem if different numbers of descriptors are used. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Remove internal tx queueSeth Forshee
The brcmsmac internal tx buffering is problematic. The amount of buffering is excessive (228 packets in addition to the 256 slots in each DMA ring), and frames may be dropped due to a lack of flow control. This patch reworks the transmit code path to remove the internal buffering. Frames are immediately handed off to the DMA support rather than passing through an intermediate queue. Non-aggregate frames are queued immediately into the tx rings, and aggregate frames are queued temporarily in an AMPDU session until ready for transmit. Transmit flow control is also added to avoid dropping packets when the tx rings are full. Conceptually this is a separate change, but it's included in this commit because removing the tx queue without adding flow control could cause significant problems. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-20brcmsmac: Use IEEE 802.11 AC levels for pktq precedence levelsSeth Forshee
The mac80211 tx queues and brcmsmac DMA fifos both map directly to AC levels. Therefore it's much more straightforward to queue tx frames and choose the tx fifo based on the mac80211 queue instead of mapping 802.1D priority tags to precedence levels then back to AC levels. mac80211 already maps the 802.1D levels to the appropriate AC levels and queues management frames at the maximum priority, so the results should be identical. One functional change resulting from this patch is that AMPDU retries no longer get a priority boost to queue them ahead of packets with the same priority already in the tx queue. This behavior will be restored (in effect at least) in a later patch when the tx queue is removed. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>