summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2011-08-29iwlagn: workqueue moves to iwl_sharedEmmanuel Grumbach10-26/+28
Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: cmd_queue moves to iwl_sharedEmmanuel Grumbach8-24/+25
Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: hw_params moves to iwl_sharedEmmanuel Grumbach19-262/+278
Since it is used by all the layers, it needs to move to iwl_shared. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: debug_level moves to struct iwl_sharedEmmanuel Grumbach7-47/+48
This will allow all the modules to look at it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: introduce struct iwl-shared - known by all layersEmmanuel Grumbach5-23/+50
This struct will hold pointers to all the layers, so that every layer will find the pointers it needs when calling another layer. Note that the drv_data set to struct device is now a pointer to struct iwl_shared. This solves of bug that I introduced in iwlagn: simplify the bus architecture Bug description: sysfs gets the the driver data from struct device. Till the aforementioned patch, dev_get_drvdata would return iwl_priv. After the patch, dev_get_drvdata return iwl_bus which is buggy since the sysfs handlers rely on this value, and sysfs handlers need iwl_priv. Now, dev_get_drvdata return iwl-shared. Since we have pointers to all the layers in iwl_shared, every layer will be able to get the pointer it needs: bus layer will gets iwl_bus from the PCI suspend callbacks, and the sysfs handlers will get the iwl_priv they need. In order to keep good encapsulation, we need to avoid to dereference iwl_priv from a different layer. This is why instead of including iwl-dev.h from iwl-shared.h, I added a forward declaration to iwl_priv. Moreover we keep type safety while providing encapsulation. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: introduce iwl-shared.hEmmanuel Grumbach18-48/+140
It will hold declaration of functions and forward declaration of struct that are used by several layers. This will allow modules not to include iwl_priv. iwl_bus and iwl_trans are still visible to all. All the layers share the module parameters, move the struct to iwl-shared.h. Also add all module parameters to iwl_mod_params instead of having them as global static. This includes * debug_level * ant_coupling * bt_ch_announce * wanted_ucode_alternative Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: use iwl_get_debug_level instead of iwl_debug_levelEmmanuel Grumbach2-6/+6
The latter may return incomplete information. For example, if one switched IWL_DL_TX on through sysfs, IWL_DL_TX bit would have been set in priv->debug_level, but since iwl_alloc_traffic_mem looked at iwl_debug_level only, it wouldn't have allocated the tx_traffic buffer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: remove out-dated commentsWey-Yi Guy1-10/+1
Portion of iwl_cfg comments is not correct anymore, remove it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: Rename iwlcore prefixWey-Yi Guy10-24/+23
There are number of functions with "iwlcore_" prefix which not feels right, rename those to "iwl_". No functional changes by making the renames. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29ath9k: minor cleanup in aniMohammed Shafi Shajakhan2-5/+2
removed a function declaration, removed a variable, renamed a variable Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29ath9k: use appropriate debug maskMohammed Shafi Shajakhan1-1/+1
in the Rx path of the driver it would be better to use ATH_DBG_ANY rather than ATH_DBG_XMIT for printing debug messages Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29p54: Use do_div for 64-bit division to fix 32-bit kernelsChristian Lamparter1-4/+8
Use the do_div macro for 64-bit division. Otherwise, the module will reference __udivdi3 under 32-bit kernels, which is not allowed in kernel space. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29ath9k: add missing AR9340 in ath_mac_bb_namesFlorian Fainelli1-0/+1
AR9340 is not listed in ath_mac_bb_names, which leads to such a message: ieee80211 phy0: Atheros AR???? Rev:0 mem=0xb8100000, irq=2 Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29Merge branch 'for-linville' of ↵John W. Linville25-1860/+2090
git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx
2011-08-26ath9k: add AR9580 supportLuis R. Rodriguez1-0/+1
This has been tested in STA and AP mode by Florian. Cc: David Quan <dquan@qca.qualcomm.com> Cc: Kathy Giori <kgiori@qca.qualcomm.com> Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Tested-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-26carl9170: Use do_div for 64-bit division to fix 32-bit kernelsChristian Lamparter1-4/+7
Use the do_div macro for 64-bit division. Otherwise, the module will reference __udivdi3 under 32-bit kernels, which is not allowed in kernel space. drivers/built-in.o: In function `carl9170_collect_tally': cmd.c:191: undefined reference to `__udivdi3' cmd.c:192: undefined reference to `__udivdi3' cmd.c:193: undefined reference to `__udivdi3' Reported-by: Kalle Valo <kvalo@adurom.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Tested-by: Kalle Valo <kvalo@adurom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-26ath9k_hw: add AR9580 supportLuis R. Rodriguez5-0/+1770
Here are the AR9580 1.0 initvals checksums using the Atheros initvals-tools [1]. This is useful for when we udate the initvals again with other values. It ensures that we match the same initvals used internally. The tool is documented on the wiki [2]. $ ./initvals -f ar9580-1p0 0x00000000e912711f ar9580_1p0_modes_fast_clock 0x000000004a488fc7 ar9580_1p0_radio_postamble 0x00000000f3888b02 ar9580_1p0_baseband_core 0x0000000003f783bb ar9580_1p0_mac_postamble 0x0000000094be244a ar9580_1p0_low_ob_db_tx_gain_table 0x0000000094be244a ar9580_1p0_high_power_tx_gain_table 0x0000000090be244a ar9580_1p0_lowest_ob_db_tx_gain_table 0x00000000ed9eaac6 ar9580_1p0_baseband_core_txfir_coeff_japan_2484 0x00000000c4d66d1b ar9580_1p0_mac_core 0x00000000e8e9043a ar9580_1p0_mixed_ob_db_tx_gain_table 0x000000003521a300 ar9580_1p0_wo_xlna_rx_gain_table 0x00000000301fc841 ar9580_1p0_soc_postamble 0x00000000a9a06b3a ar9580_1p0_high_ob_db_tx_gain_table 0x00000000a15ccf1b ar9580_1p0_soc_preamble 0x0000000029495000 ar9580_1p0_rx_gain_table 0x0000000037ac0ee8 ar9580_1p0_radio_core 0x00000000603a1b80 ar9580_1p0_baseband_postamble 0x000000003d8b4396 ar9580_1p0_pcie_phy_clkreq_enable_L1 0x00000000398b4396 ar9580_1p0_pcie_phy_clkreq_disable_L1 0x00000000397b4396 ar9580_1p0_pcie_phy_pll_on_clkreq [1] git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/initvals-tool.git [2] http://wireless.kernel.org/en/users/Drivers/ath9k_hw/initvals-tool Cc: David Quan <dquan@qca.qualcomm.com> Cc: Kathy Giori <kgiori@qca.qualcomm.com> Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Tested-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-26ath9k_htc: Add get_stats call backMohammed Shafi Shajakhan1-0/+17
currently this call back is used only in debugfs of mac80211 Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-26b43: correct warning for uninitialized variable 'macstat'John W. Linville1-1/+1
CC [M] drivers/net/wireless/b43/pio.o drivers/net/wireless/b43/pio.c: In function ‘pio_rx_frame’: drivers/net/wireless/b43/pio.c:614:6: warning: ‘macstat’ may be used uninitialized in this function Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-26ath9k: remove replicated null check in ath_pci_aspm_initJohn W. Linville1-6/+2
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-26b43: HT-PHY: read clip stateRafał Miłecki2-1/+14
We don't know yet when to restore it, implement just reading. We found out what for are that PHY ops by comparing HT with N code. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-26b43: HT-PHY: use separated function for forcing RF sequenceRafał Miłecki2-9/+34
Comparison of the HT and N code has shown similarities in the ops performed after b43_mac_phy_clock_set. That way we understood what is happening in the HT-PHY code. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-26ath9k: Send legacy rated frames as unaggregatedRajkumar Manoharan1-1/+21
Currently the aggregation is formed till the aggregation limit is reached and the rate lookup is done for the first frame alone. But there can be a legacy rated frames in tid queue. This patch limits the subframe addition based on presence of legacy rate and sends the legacy rated frames as unaggregated one. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-26b43: drop Kconfig option of forcing PIO modeRafał Miłecki3-17/+1
We have module param called use_pio which is much easier to use. Cc: Larry Finger <larry.finger@lwfinger.net> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24libertas: update readme fileAmitkumar Karwar1-25/+0
Since all wext specific code is removed, currently there is no way to configure deep sleep mode. This patch removes deep sleep configuration information in readme file. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24rtlwifi: rtl8192de: Convert to use the new rate-mapping routine in rtlwifiLarry Finger4-161/+33
This patch also deletes the now unused parts of rtl8192de/def.h. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24rtlwifi: rtl8192se: Convert to use the new rate-mapping routine in rtlwifiLarry Finger3-161/+32
This patch also deletes the now unused parts of rtl8192se/def.h. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24rtlwifi: rtl8192cu: Convert to use the new rate-mapping routine in rtlwifiLarry Finger6-172/+32
This patch also removes the now unused code from rtl8192ce/def.h. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24rtlwifi: rtl8192ce: Convert to use the new rate-mapping routine in rtlwifiLarry Finger3-127/+27
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24rtlwifi: Install updated rate-mapping routineLarry Finger3-0/+198
In preparation for fixing the rate-mapping situation, place a driver-agnostic version in rtlwifi. This one contains the updated rate incormation. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24drivers/net/wireless/mwifiex/scan.c: test the just-initialized valueJulia Lawall1-2/+2
Test the just-initialized value rather than some other one. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ identifier x,y,f!={PTR_ERR,ERR_PTR,ERR_CAST}; statement S; @@ x = f(...); ( if (\(x == NULL\|IS_ERR(x)\)) S | *if (\(y == NULL\|IS_ERR(y)\)) { ... when != x return ...; } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24b43/legacy: Remove firmware IDsMichael Büsch4-15/+2
This removes the "FWxx" ID strings from the b43 and b43legacy drivers. They were once used to match a specific driver revision to a set of firmware files. However, this is hardly useful today. Additionally, the IDs are not updated and maintained properly, so they might mislead users. Signed-off-by: Michael Buesch <m@bues.ch> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24ath9k_hw: Disable Walsh spatial spreading for 2 chainsRajkumar Manoharan2-2/+2
The Walsh bit is disabled for regulatory consideration. FCC limit for walsh enable is lower than that for walsh disable. So disabling walsh bit will not limit tx power/affect tx power even in cases where we are not FCC limited (most client cards). If the tx power is not FCC limited, then enabling/disabling walsh bit will not affect Avg. EVM/overall performance in any visible manner. Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24ath9k: Change rate control to use legacy rate as last MRRRajkumar Manoharan1-7/+27
In congested network, having all rate reties at MCS rates is failing to transmit the frame offenly. By the time reaching the success rate set, the application gets timed out. One such scenario is that authentication time out during 4-Way handshake. This patch uses a legacy rate as last retry sequnce for unaggregated frames or if the first selected rate's PER is ~80% of max limit. And also observed from the tx status that the frame was trasmitted successfully by using legacy rates. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24ath9k_hw: Fix descriptor status of TxOpExceededRajkumar Manoharan1-2/+2
Cc: stable@kernel.org Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24ath9k: Add support for get_stats callbackMohammed Shafi Shajakhan1-1/+16
this useful for debugging and to keep track of success/failure of frames such as ACK, RTS and FCS error count in a noisy environment Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24p54: improve site surveyChristian Lamparter5-14/+211
The firmware keeps track of channel usage. This data can be used by the automatic channel selection to find the best channel. Survey data from wlan4 frequency: 5200 MHz [in use] noise: -91 dBm channel active time: 811909 ms channel busy time: 63395 ms channel transmit time: 59636 ms Survey data from wlan4 frequency: 5210 MHz noise: -91 dBm channel active time: 121 ms channel busy time: 119 ms channel transmit time: 0 ms Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24NFC: Reserve tx head and tail roomSamuel Ortiz1-14/+3
We can have the NFC core layer allocating the tx head and tail room for the drivers and avoid 1 or more SKBs copy on write on the Tx path. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24bcma: signedness bug in bcma_get_next_core()Dan Carpenter1-1/+1
The u32 would never be less than zero so the error handling would break. I changed it to s32 to match how bcma_erom_get_mst_port() is declared. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24ath9k: fix MGMT packets when using TKIPBill Jordan1-1/+2
Prevent 8 bytes from being truncated from MGMT packets when using TKIP. Signed-off-by: Bill Jordan <bjordan@rajant.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24b43: warn when forcing PIO modeRafał Miłecki1-2/+7
We have resolved all the known issues with DMA mode, however some users (or distros) are still forcing PIO mode by config files. Without debugging enabled it's not noticable at all. Add the warning for them. Cc: Gregory Bellier <gregory.bellier@gmail.com> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24ath9k_hw: fix EIFS value to microsecondsAlex Hacker1-1/+1
The EIFS value read from AR_D_GBL_IFS_EIFS register in core clocks and then written back as microsecond value. Signed-off-by: Alex Hacker <hacker@epn.ru> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24b43: LCN-PHY: init 0x2064 radioRafał Miłecki1-0/+54
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24b43: LCN-PHY: basic PHY initRafał Miłecki1-2/+72
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24carl9170: export HW random number generatorChristian Lamparter3-0/+139
All AR9170 hardware have a 16-Bit random number generator. The documentation claims the values are suitable for "security keys". The "throughput" is around 320Kibit/s. It's slow, but it does work without introducing any special offload firmware commands. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24carl9170: improve site surveyChristian Lamparter5-15/+153
The firmware keeps track of channel usage. This data can be used by the automatic channel selection to find the *best* channel. Survey data from wlan22 frequency: 2412 MHz [in use] noise: -86 dBm channel active time: 3339608 ms channel busy time: 270982 ms channel transmit time: 121515 ms Survey data from wlan22 frequency: 2417 MHz noise: -86 dBm channel active time: 70 ms channel busy time: 2 ms channel transmit time: 1 ms Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24carl9170: import updated firmware headersChristian Lamparter2-2/+13
Import new headers from our firmware branch: git://git.kernel.org/pub/scm/linux/kernel/git/chr/carl9170fw.git Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24carl9170: fix timekeeping for HW_COUNTER firmwaresChristian Lamparter3-5/+8
AR9170_PWR_REG_PLL_ADDAC is used to set the main clock divisor which affects the AHB/CPU speed. Because this would interfere with the firmware internal timekeeping, the function has to be moved into the firmware. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24libertas: handle mesh networks in lbs_iface_active()Dan Carpenter1-2/+2
There was an extra semicolon so the if condition wasn't used. We checked "priv->dev" twice instead of "priv->mesh_dev". Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24b43: LCN-PHY: add init tablesRafał Miłecki3-0/+451
They were taken from MMIO dump with few RegExps and vim. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>