This issue totally destroyed deployment of DNUA-93F (AR9271) USB Wifi in a
similar application. Now use Realtek with very stable results.

But there is history.

See https://patchwork.kernel.org/patch/2177921/ and attached.

Trevor
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Harshal Vora
Sent: 26 April 2013 11:43
To: Adrian Chadd
Cc: [email protected]
Subject: Re: [ath9k-devel] varying RSSI values with ath9k_htc drivers for
TL-WN721N USB wifi adapter.

On Friday 26 April 2013 01:39 AM, Adrian Chadd wrote:
> Have you actually verified that the output power of those devices is 
> actually constant?
>
>
>
> Adrian
>
> On 25 April 2013 07:08, Harshal Vora <[email protected]> wrote:
>> Hi,
>>
>> I are trying to achieve approximate location detection (room level
>> granularity) based on RSSI.
>> I am using TP-LINK TL-WN721N USB wifi adapter which require ath9k_htc 
>> drivers.
>> Operating system: Ubuntu 12:04 LTS.
>>
>> The RSSI values recorded vary a lot, even when the transmitter 
>> (iPhone 5 and sony xPeria and other phones) and the receiver are left 
>> untouched at the same location.
>>
>> There is a difference of almost 15 to 20 dbm in the readings.
>> Sometimes it is in the range of -40 to -50dbm .. sometimes -50 to 
>> -60dbm
>>
>> Also sometimes the RSSI values are always between -75 to -85 dbm no 
>> matter how short or long the distance is between the two devices.
>>
>> I am using airmon-ng to set the device in monitor mode and tshark to
sniff.
>> I have tried with the drivers that come with ubuntu 12.04, with 
>> compat-wireless 3.6.8-1 as well as compat-drivers 3.8.3-2
>>
>> The todo list on
>> http://wireless.kernel.org/en/users/Drivers/ath9k_htc#TODO
>> mentions
>> Low RSSI issue for UB91/94.
>>
>> Should this be a concern?
>>
>>
>> Regards,
>>
>> _______________________________________________
>> ath9k-devel mailing list
>> [email protected]
>> https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Hi,

I have a MAC laptop which has inbuilt broadcom BCM 4331 chipset running on
b43 drivers.

I put the iPhone in charging and it is always unlocked and on the wifi
settings page which displays available networks.
 From what I understand, iPhone goes in power saver mode only when locked.
The readings on bcm4331 are much stable as compared to the wn721n usb
adapter.
On broadcom, the dbm values differ mostly by 3-4 dbm and sometimes I see a
spike with a difference of 7-8dbm.
On the other hand the dbm values using ath9k_htc drivers differ by 10-15dbm.

I have also tested with a locked iPhone to get similar results.

In another setup, I connected one wn721n chipset to hackberry and another to
my laptop.
Again I took two sets of readings with transmitter as wn721n on hackberry
and receiver as bcm4331 in the first run and receiver as wn721n on my mac in
the second run.
Again similar observaions as the experiment with iPhone as transmitter.

How can I measure the output transmission power? I deployed the ath9k_htc
drivers in debug mode with value 0xffffffff. But cannot get any relevant
information from debugfs.
When I do ifconfig, it says power management off.
When I run sudo iwconfig "dev" txpower "value", it returns an error.

I have taken a lot of different sets of readings for ath9k_htc, and
relatively the readings are correct. i.e. the dbm values will change as the
distance between the transmitter and receiver changes. But sometimes the dbm
values remain in a particular range say -75dbm to -85dbm no matter how near
or far the transmitter is from the receiver.

Regards,
_______________________________________________
ath9k-devel mailing list
[email protected]
https://lists.ath9k.org/mailman/listinfo/ath9k-devel
--- Begin Message ---
add an if-guard, otherwise iw(8) reports weird signal strengths.

The behaviour was fine before this commit:
        7c277349ecbd66e19fad3d949fa6ef6c131a3b62
Therefore, this patch is a partially revert of it.

In my testsetup, I have two access points:
  00:12:XX  within one meter physically range
  c0:c1:XX  ~15m, two (thin) walls

        w/o patch:
          00:12:XX  -82.00 dBm
          c0:c1:XX  -84.00 dBm

        with patch:
          00:12:XX  -45.00 dBm
          c0:c1:XX  -63.00 dBm

Tested with "TP-Link TL-WN722N"

Reported-by: Markus Krainz <[email protected]>
Tested-by: Markus Krainz <[email protected]>
Signed-off-by: Bernhard Urban <[email protected]>
---
 drivers/net/wireless/ath/ath9k/htc.h          |    1 +
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c |   29
+++++++++++++++----------
 2 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc.h
b/drivers/net/wireless/ath/ath9k/htc.h
index b30596f..602e19b 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -22,6 +22,7 @@
 #include <linux/firmware.h>
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
+#include <linux/etherdevice.h>
 #include <linux/leds.h>
 #include <linux/slab.h>
 #include <net/mac80211.h>
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 06cdcb7..a38435a 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -969,6 +969,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv
*priv,
        int hdrlen, padpos, padsize;
        int last_rssi = ATH_RSSI_DUMMY_MARKER;
        __le16 fc;
+       u8 is_mybeacon;
 
        if (skb->len < HTC_RX_FRAME_HEADER_SIZE) {
                ath_err(common, "Corrupted RX frame, dropping (len: %d)\n",
@@ -1060,22 +1061,28 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv
*priv,
        ath9k_process_rate(hw, rx_status, rxbuf->rxstatus.rs_rate,
                           rxbuf->rxstatus.rs_flags);
 
-       if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
-           !rxbuf->rxstatus.rs_moreaggr)
-               ATH_RSSI_LPF(priv->rx.last_rssi,
-                            rxbuf->rxstatus.rs_rssi);
+       is_mybeacon = ieee80211_is_beacon(fc) &&
+                                 !is_zero_ether_addr(common->curbssid) &&
+                                 ether_addr_equal(hdr->addr3,
common->curbssid);
 
-       last_rssi = priv->rx.last_rssi;
+       if (is_mybeacon && priv->ah->opmode == NL80211_IFTYPE_STATION) {
+               if (rxbuf->rxstatus.rs_rssi != ATH9K_RSSI_BAD &&
+                   !rxbuf->rxstatus.rs_moreaggr)
+                       ATH_RSSI_LPF(priv->rx.last_rssi,
+                                    rxbuf->rxstatus.rs_rssi);
 
-       if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER))
-               rxbuf->rxstatus.rs_rssi = ATH_EP_RND(last_rssi,
-
ATH_RSSI_EP_MULTIPLIER);
+               last_rssi = priv->rx.last_rssi;
 
-       if (rxbuf->rxstatus.rs_rssi < 0)
-               rxbuf->rxstatus.rs_rssi = 0;
+               if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER)) {
+                       s8 rssi = ATH_EP_RND(last_rssi,
ATH_RSSI_EP_MULTIPLIER);
+                       rxbuf->rxstatus.rs_rssi = rssi;
+               }
+
+               if (rxbuf->rxstatus.rs_rssi < 0)
+                       rxbuf->rxstatus.rs_rssi = 0;
 
-       if (ieee80211_is_beacon(fc))
                priv->ah->stats.avgbrssi = rxbuf->rxstatus.rs_rssi;
+       }
 
        rx_status->mactime = be64_to_cpu(rxbuf->rxstatus.rs_tstamp);
        rx_status->band = hw->conf.channel->band;
-- 
1.7.9.5

_______________________________________________
ath9k-devel mailing list
[email protected]
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

--- End Message ---
_______________________________________________
ath9k-devel mailing list
[email protected]
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to