Send users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://rt2x00.serialmonkey.com/mailman/listinfo/users_rt2x00.serialmonkey.com
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of users digest..."
Today's Topics:
1. Re: [PATCH v3 1/2] rt2x00: rt2800lib: add
rt2800_hw_beacon_base helper (Helmut Schaa)
2. Re: [PATCH v3 2/2] rt2x00: rt2800lib: don't hardcode beacon
offsets (Helmut Schaa)
3. Re: RT5572 can connect only within 15 meters (Stanislaw Gruszka)
----------------------------------------------------------------------
Message: 1
Date: Fri, 23 Aug 2013 10:23:42 +0200
From: Helmut Schaa <[email protected]>
To: Gabor Juhos <[email protected]>
Cc: linux-wireless <[email protected]>, rt2x00 Users List
<[email protected]>
Subject: Re: [rt2x00-users] [PATCH v3 1/2] rt2x00: rt2800lib: add
rt2800_hw_beacon_base helper
Message-ID:
<cagxe3d9afraktiml5dcvgovjel_wayxtratsq20ktez1bmc...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On Thu, Aug 22, 2013 at 8:53 PM, Gabor Juhos <[email protected]> wrote:
> The HW_BEACON_BASE() macro returns the base address
> of a given beacon, however the returned values are
> not usable on all chipsets. On devices which have
> selectable shared memory parts, some beacon may be
> located in the high part of the shared memory.
>
> Instead of extending the already complicated macro,
> add a new helper function and use that to get the
> base address of a given beacon.
>
> The actual patch contains no functional changes, the
> helper function will be extended in a further patch
> to handle different chipsets' requirements.
>
> Signed-off-by: Gabor Juhos <[email protected]>
Looks good.
Acked-by: Helmut Schaa <[email protected]>
> ---
> Changes since v2:
> - separated from the 'rt2x00: fix beaconing on RT3593' patch-set
> - update commit log
>
> Changes since v1: ---
> ---
> drivers/net/wireless/rt2x00/rt2800lib.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c
> b/drivers/net/wireless/rt2x00/rt2800lib.c
> index aa6b6b0..38606e2 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -940,6 +940,12 @@ void rt2800_txdone_entry(struct queue_entry *entry, u32
> status, __le32 *txwi)
> }
> EXPORT_SYMBOL_GPL(rt2800_txdone_entry);
>
> +static unsigned int rt2800_hw_beacon_base(struct rt2x00_dev *rt2x00dev,
> + unsigned int index)
> +{
> + return HW_BEACON_BASE(index);
> +}
> +
> void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc
> *txdesc)
> {
> struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
> @@ -992,7 +998,8 @@ void rt2800_write_beacon(struct queue_entry *entry,
> struct txentry_desc *txdesc)
> return;
> }
>
> - beacon_base = HW_BEACON_BASE(entry->entry_idx);
> + beacon_base = rt2800_hw_beacon_base(rt2x00dev, entry->entry_idx);
> +
> rt2800_register_multiwrite(rt2x00dev, beacon_base, entry->skb->data,
> entry->skb->len + padding_len);
>
> @@ -1017,7 +1024,7 @@ static inline void rt2800_clear_beacon_register(struct
> rt2x00_dev *rt2x00dev,
> const int txwi_desc_size = rt2x00dev->bcn->winfo_size;
> unsigned int beacon_base;
>
> - beacon_base = HW_BEACON_BASE(index);
> + beacon_base = rt2800_hw_beacon_base(rt2x00dev, index);
>
> /*
> * For the Beacon base registers we only need to clear
> --
> 1.7.10
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
------------------------------
Message: 2
Date: Fri, 23 Aug 2013 10:31:13 +0200
From: Helmut Schaa <[email protected]>
To: Gabor Juhos <[email protected]>
Cc: linux-wireless <[email protected]>, rt2x00 Users List
<[email protected]>
Subject: Re: [rt2x00-users] [PATCH v3 2/2] rt2x00: rt2800lib: don't
hardcode beacon offsets
Message-ID:
<CAGXE3d8f2ND3yOienUK0t=ogcwmlzm-+dug_lc6k+rn9xws...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On Thu, Aug 22, 2013 at 8:53 PM, Gabor Juhos <[email protected]> wrote:
> The values written into the BCN_OFFSET[01] registers are
> hardcoded in the rt2800_init_register function.
>
> Add a macro and a helper function to derive these values
> directly from the base address of a given beacon, and use
> the new function instead of the hardcoded numbers.
>
> The patch contains no functional changes. The programmed
> register values are the same before and after the patch.
>
> Signed-off-by: Gabor Juhos <[email protected]>
Fine with me as well.
Acked-by: Helmut Schaa <[email protected]>
> ---
> Changes since v2:
> - separated from the 'rt2x00: fix beaconing on RT3593' patch-set
>
> Changes since v1: ---
> ---
> drivers/net/wireless/rt2x00/rt2800.h | 2 ++
> drivers/net/wireless/rt2x00/rt2800lib.c | 30 ++++++++++++++++++++++--------
> 2 files changed, 24 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800.h
> b/drivers/net/wireless/rt2x00/rt2800.h
> index e25e5bf..fa33b5e 100644
> --- a/drivers/net/wireless/rt2x00/rt2800.h
> +++ b/drivers/net/wireless/rt2x00/rt2800.h
> @@ -2024,6 +2024,8 @@ struct mac_iveiv_entry {
> (((__index) < 6) ? (HW_BEACON_BASE4 + ((__index - 4) * 0x0200)) : \
> (HW_BEACON_BASE6 - ((__index - 6) * 0x0200))))
>
> +#define BEACON_BASE_TO_OFFSET(_base) (((_base) - 0x4000) / 64)
> +
> /*
> * BBP registers.
> * The wordsize of the BBP is 8 bits.
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c
> b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 38606e2..20243dc 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -946,6 +946,12 @@ static unsigned int rt2800_hw_beacon_base(struct
> rt2x00_dev *rt2x00dev,
> return HW_BEACON_BASE(index);
> }
>
> +static inline u8 rt2800_get_beacon_offset(struct rt2x00_dev *rt2x00dev,
> + unsigned int index)
> +{
> + return BEACON_BASE_TO_OFFSET(rt2800_hw_beacon_base(rt2x00dev, index));
> +}
> +
> void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc
> *txdesc)
> {
> struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
> @@ -4474,17 +4480,25 @@ static int rt2800_init_registers(struct rt2x00_dev
> *rt2x00dev)
> return ret;
>
> rt2800_register_read(rt2x00dev, BCN_OFFSET0, ®);
> - rt2x00_set_field32(®, BCN_OFFSET0_BCN0, 0xe0); /* 0x3800 */
> - rt2x00_set_field32(®, BCN_OFFSET0_BCN1, 0xe8); /* 0x3a00 */
> - rt2x00_set_field32(®, BCN_OFFSET0_BCN2, 0xf0); /* 0x3c00 */
> - rt2x00_set_field32(®, BCN_OFFSET0_BCN3, 0xf8); /* 0x3e00 */
> + rt2x00_set_field32(®, BCN_OFFSET0_BCN0,
> + rt2800_get_beacon_offset(rt2x00dev, 0));
> + rt2x00_set_field32(®, BCN_OFFSET0_BCN1,
> + rt2800_get_beacon_offset(rt2x00dev, 1));
> + rt2x00_set_field32(®, BCN_OFFSET0_BCN2,
> + rt2800_get_beacon_offset(rt2x00dev, 2));
> + rt2x00_set_field32(®, BCN_OFFSET0_BCN3,
> + rt2800_get_beacon_offset(rt2x00dev, 3));
> rt2800_register_write(rt2x00dev, BCN_OFFSET0, reg);
>
> rt2800_register_read(rt2x00dev, BCN_OFFSET1, ®);
> - rt2x00_set_field32(®, BCN_OFFSET1_BCN4, 0xc8); /* 0x3200 */
> - rt2x00_set_field32(®, BCN_OFFSET1_BCN5, 0xd0); /* 0x3400 */
> - rt2x00_set_field32(®, BCN_OFFSET1_BCN6, 0x77); /* 0x1dc0 */
> - rt2x00_set_field32(®, BCN_OFFSET1_BCN7, 0x6f); /* 0x1bc0 */
> + rt2x00_set_field32(®, BCN_OFFSET1_BCN4,
> + rt2800_get_beacon_offset(rt2x00dev, 4));
> + rt2x00_set_field32(®, BCN_OFFSET1_BCN5,
> + rt2800_get_beacon_offset(rt2x00dev, 5));
> + rt2x00_set_field32(®, BCN_OFFSET1_BCN6,
> + rt2800_get_beacon_offset(rt2x00dev, 6));
> + rt2x00_set_field32(®, BCN_OFFSET1_BCN7,
> + rt2800_get_beacon_offset(rt2x00dev, 7));
> rt2800_register_write(rt2x00dev, BCN_OFFSET1, reg);
>
> rt2800_register_write(rt2x00dev, LEGACY_BASIC_RATE, 0x0000013f);
> --
> 1.7.10
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
------------------------------
Message: 3
Date: Fri, 23 Aug 2013 11:48:18 +0200
From: Stanislaw Gruszka <[email protected]>
To: Fabien ADAM <[email protected]>
Cc: [email protected]
Subject: Re: [rt2x00-users] RT5572 can connect only within 15 meters
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
On Wed, Aug 21, 2013 at 11:24:20PM +0200, Fabien ADAM wrote:
> Hello,
>
> I use rt2800usb on Linux 3.11 rc3 with Ralink 802.11n WLAN
> (idVendor=148f, idProduct=5572).
> Previously I used the Ralink driver on Linux 3.2 (RT5572 USB -
> v2.6.1.3). The Ralink driver doesn't work on newer linux version
> (RTMPSetTimer failed)
>
> It works well at 5 meters from the AP with rt2800usb but doesn't work at
> 15 meters. I've got errors like:
> wlan1: authenticate with [MAC]
> wlan1: direct probe to [MAC] (try 1, 2 and 3/3)
> wlan1: authentication with [MAC] timed out
>
> I tried to bring the wireless dongle a little bit closer to the AP with
> an usb extension cable and this allow the connexion to establish without
> these errors and then it works normally.
> The wireless dongle can work at longer distance as it perfectly worked
> with previous Ralink driver.
>
> I tried to replace the firmware rt2870.bin with the one of Ralink
> previous driver (rt2870_sw_ch_offload.bin) but it didn't change anything.
> So I think there is a bug within rt2800 driver and not in the firmware
> part, but I don't know what else I can do to help fixing that bug. I'm
> not a developer but I may do some compilations and tests that might help.
Could you check if attached patch helps ?
Stanislaw
-------------- next part --------------
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c
b/drivers/net/wireless/rt2x00/rt2800lib.c
index 313da6a..5fa9c8c 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -3368,6 +3368,10 @@ static int rt2800_get_gain_calibration_delta(struct
rt2x00_dev *rt2x00dev)
u8 step;
int i;
+ rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom);
+ if (!rt2x00_get_field16(eeprom, EEPROM_NIC_CONF1_EXTERNAL_TX_ALC))
+ return 0;
+
/*
* Read TSSI boundaries for temperature compensation from
* the EEPROM.
------------------------------
Subject: Digest Footer
_______________________________________________
users mailing list
[email protected]
http://rt2x00.serialmonkey.com/mailman/listinfo/users_rt2x00.serialmonkey.com
------------------------------
End of users Digest, Vol 54, Issue 15
*************************************