summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rtl818x
AgeCommit message (Collapse)Author
2011-03-04rtl8187: Change rate-control feedbackLarry Finger
The driver for the RTL8187L chips returns IEEE80211_TX_STAT_ACK for all packets, even if the maximum number of retries was exhausted. In addition it fails to setup max_rates in the ieee80211_hw struct, This behavior may be responsible for the problems noted in Bug 14168. As the bug is very old, testers have not been found, and I do not have the case where the indicated signal is less than -70 dBm. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net> Cc: Stable <stable@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-25mac80211: make tx() operation return voidJohannes Berg
The return value of the tx operation is commonly misused by drivers, leading to errors. All drivers will drop frames if they fail to TX the frame, and they must also properly manage the queues (if they didn't, mac80211 would already warn). Removing the ability for drivers to return a BUSY value also allows significant cleanups of the TX TX handling code in mac80211. Note that this also fixes a bug in ath9k_htc, the old "return -1" there was wrong. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k] Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi] Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx] Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-23mac80211: rename RX_FLAG_TSFTJohannes Berg
The flag isn't very descriptive -- the intention is that the driver provides a TSF timestamp at the beginning of the MPDU -- make that clearer by renaming the flag to RX_FLAG_MACTIME_MPDU. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22rtl818x: move rtl8180 and rtl8187 to separate subdirectoriesJohn W. Linville
These drivers share one header file, but nothing else. Worse, both drivers use the rtl8225 part with different register settings. The results has been some ugly naming -- let's simplify that. Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
2010-11-15rtl8187: restore anaparam registers after reset with 8187BHerton Ronaldo Krzesinski
Current 8187B initialization misses anaparam registers restore after 8187 reset. This causes ANAPARAM register to stay zeroed out (ANAPARAM2 kept its value on my tests). To avoid this, call rtl8187_set_anaparam right after chip reset (to be on the safe side, as it makes sure we restore all ANAPARAM registers). Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: seno <senada@t-online.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15rtl8187: remove uneeded setting of anaparam writeHerton Ronaldo Krzesinski
Usually you set RTL818X_CONFIG3_ANAPARAM_WRITE when you are going to change/write ANAPARAM registers. But in current initialization of RTL8187B there is a place where ANAPARAM_WRITE bit is set without any ANAPARAM register being written, without reason, so remove it. Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: seno <senada@t-online.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15rtl8187: consolidate anaparam on/off write sequencesHerton Ronaldo Krzesinski
There are repeated calls for anaparam on/off sequence in the code. Consolidate the common code in rtl8187_set_anaparam and use it where needed. Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15rtl8187: don't set RTL818X_CONFIG3_GNT_SELECT flag on 8187BHerton Ronaldo Krzesinski
The GNTSel bit should only concern pci devices by looking at RTL8180 spec, which is not the case of 8187B. Also testing shows that trying to set this bit fails, a subsequent read from the register after trying to set it shows that the bit isn't set, seems the hardware ignores it, which makes sense. This setting was a left over from Realtek sources. Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15rtl8187: move pll reset at start out of ANAPARAM writeHerton Ronaldo Krzesinski
On 8187B start, comment about pll reset, and move it out of ANAPARAM write sequence, so that code is more readable. Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15rtl8187: avoid redundant write to register FF72 (RFSW_CTRL)Herton Ronaldo Krzesinski
The table with misc register initialization was setting it, and later on we would set it again with a explicity call to rtl818x_iowrite16_idx. Remove duplicate initialization from the register table. Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15rtl8187: fix wrong register initialization in 8187BHerton Ronaldo Krzesinski
We were using wrong address for BRSR (Basic Rate Set Register) while initializing its value, comparing with Realtek sources, for 8187B case. Also, the same register is initialized in rtl8187b_reg_table, so remove the duplicate initialization from the table. Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15rtl8187: remove setting of beacon/atim registers from initializationHerton Ronaldo Krzesinski
On 8187B path, we set a initial value for beacon interval and atim window on initialization. But this isn't needed, since same setup is done on rtl8187_config. Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15rtl8187: remove redundant initialization of ARFRHerton Ronaldo Krzesinski
This removes redundant write to Auto Rate Fallback Register on RTL8187B. The same value was being written twice in the same function. Avoid this removing the duplicate initialization on rtl8187b_reg_table, and also add comment for this write (information from Realtek source). Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15rtl8187b: do not do per packet TX AGCThadeu Lima de Souza Cascardo
Clearing the per packet TX AGC for the RTL8187B device appears to increase its overall TX power. This allows the device to associate and a connection to be established using APs a little further away. This is in accordance to what is done for RTL8187L devices and also what Realtek drivers do. Tested-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Cc: linux-wireless@vger.kernel.org Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Rogerio Luz Coelho <rogluz.news@gmail.com> Cc: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Cc: Hin-Tak Leung <hintak.leung@gmail.com> Cc: seno <senada@t-online.de> Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-10-07Revert "rtl8180: use NAPI for bottom-half processing"John W. Linville
This reverts commit 030725d2c7c1fafec7ede618647bf30ed79601f0. This commit relies on commit 5ed3bc7288487bd4f891f420a07319e0b538b4fe ("mac80211: use netif_receive_skb in ieee80211_tx_status callpath") Unfortunately not all drivers are calling ieee80211_tx_status from a compatible context, so that commit needs to be reverted in 2.6.36. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-24Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-core.c drivers/net/wireless/iwlwifi/iwl-core.h
2010-08-18drivers/net/wireless: Restore upper case words in wiphy_<level> messagesJoe Perches
Commit c96c31e499b70964cfc88744046c998bb710e4b8 "(drivers/net/wireless: Use wiphy_<level>)" inadvertently changed some upper case words to lower case. Restore the original case. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-16rtl8187: consolidate MSR writes in rtl8187_bss_info_changedJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-16rtl8180: use RTL818X_MSR_ADHOC for IBSS connectionJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-16rtl8180: use NAPI for bottom-half processingJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-05rtl8180: avoid potential NULL deref in rtl8180_beacon_workJohn W. Linville
ieee80211_beacon_get can return NULL... Signed-off-by: John W. Linville <linville@tuxdriver.com> Cc: stable@kernel.org
2010-07-27drivers/net/wireless: Use wiphy_<level>Joe Perches
Standardize the logging macros used. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-27Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-commands.h
2010-07-26rtl8180: silence "dubious: x | !y" sparse warningJohn W. Linville
CHECK drivers/net/wireless/rtl818x/rtl8180_rtl8225.c drivers/net/wireless/rtl818x/rtl8180_rtl8225.c:53:33: warning: dubious: x | !y The existing code is clever and works fine, but it's not worth even a single line of Sparse warning SPAM... Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-26rtl8180: improve signal reporting for actual rtl8180 hardwareJohn W. Linville
Adapted from Realtek-provided driver... Signed-off-by: John W. Linville <linville@tuxdriver.com> Tested-by: Pauli Nieminen <suokkos@gmail.com>
2010-07-20rtl8180: improve signal reporting for rtl8185 hardwareJohn W. Linville
The existing code seemed to be somewhat based on the datasheet, but varied substantially from the vendor-provided driver. This mirrors the handling of the rtl8185 case from that driver, but still neglects the specifics for the rtl8180 hardware. Those details are a bit muddled... Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-01Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 Conflicts: drivers/net/wireless/libertas/host.h
2010-06-24rtl8180: mark rtl8180_beacon_work staticJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-03drivers/net: use __packed annotationEric Dumazet
cleanup patch. Use new __packed annotation in drivers/net/ Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-11Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/ath/ar9170/main.c
2010-05-10rtl8180: change PCI DMA mask to DMA_BIT_MASK(32)John W. Linville
From the original report: "I had problems to get my rtl8185 PCI card running on Sparc64: I always got an error about "No suitable DMA available" followed by an error that no device could be detected. When comparing the rtl8180 driver to others I noticed that others are mostly using DMA_BIT_MASK so I changed the custom mask to DMA_BIT_MASK(32) which fixed my issue." Reported-by: Tiziano Müller <tm@dev-zero.ch> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-07rtl8180: add software-based support for IBSS modeJohn W. Linville
Device documentation suggests that hardware support for beaconing is available. But I implemented software-based beacon generation as an experiment and it seems better to have that working now rather than waiting for something better to materialize. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-07rtl8180: assign sequence numbers in the driverJohn W. Linville
This is a step towards support for beaconing modes of operation. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-05Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/libertas_tf/cmd.c drivers/net/wireless/libertas_tf/main.c
2010-05-05rtl8187: use SET_IEEE80211_PERM_ADDRJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
2010-05-04rtl8180: use SET_IEEE80211_PERM_ADDRJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-30rtl8180: fix tx status reportingJohn W. Linville
When reporting Tx status, indicate that only one rate was used. Otherwise, the rate is frozen at rate index 0 (i.e. 1Mb/s). Signed-off-by: John W. Linville <linville@tuxdriver.com> Cc: stable@kernel.org
2010-04-28rtl8180: use cached queue mapping for skb in rtl8180_txJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-23Merge branch 'master' into for-davemJohn W. Linville
Conflicts: drivers/net/wireless/ath/ath9k/phy.c drivers/net/wireless/iwlwifi/iwl-6000.c drivers/net/wireless/iwlwifi/iwl-debugfs.c
2010-04-16rtl818x: Move configuration details to the rtl818x directoryLarry Finger
In preparation for new rtl818x devices, move the existing rtl818x configuration into the rtl818x directory. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-11Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/stmmac/stmmac_main.c drivers/net/wireless/wl12xx/wl1271_cmd.c drivers/net/wireless/wl12xx/wl1271_main.c drivers/net/wireless/wl12xx/wl1271_spi.c net/core/ethtool.c net/mac80211/scan.c
2010-04-03net: convert multicast list to list_headJiri Pirko
Converts the list and the core manipulating with it to be the same as uc_list. +uses two functions for adding/removing mc address (normal and "global" variant) instead of a function parameter. +removes dev_mcast.c completely. +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for manipulation with lists on a sandbox (used in bonding and 80211 drivers) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-02-25Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-core.h drivers/net/wireless/rt2x00/rt2800pci.c
2010-02-15rtl8187: fix typo in ifdef commentHauke Mehrtens
Cc: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-14Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/mac80211/rate.c
2010-02-10rtl8187: Add new device IDJelle Martijn Kok
Add new RTL8187B device. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-04Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2010-01-27rtl8187: Add callback for get_tsfLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-27rtl8180: implement get_tsf op for mac80211John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>