Message ID | 2186338.AojtHidiB8@bentobox (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kalle Valo |
Headers | show |
On 09/06/2016 08:09 AM, Sven Eckelmann wrote: > On Dienstag, 6. September 2016 09:40:41 CEST Sven Eckelmann wrote: >> On Freitag, 2. September 2016 12:53:28 CEST Larry Finger wrote: >> [...] >> >>> The patch I included in my previous E-mail, and attached here, does get >>> the firmware loaded correctly. There is still a problem that prevents >>> authentication. I'm still looking for that issue. >> >> Thanks for the fast update. I am currently testing your patch. It looks like >> the initial error is now gone. The hostapd also starts but beaconing >> doesn't seem to work at all (no error from the kernel/hostapd but the >> device is not sending anything). I am currently checking how beaconing is >> supposed to work in your driver. Maybe I will spot something useful. > > Yes, found something similar in the checksumming algorithm. See the attached > patch for details. Just for the record, this is not "my" driver. It was provided by Realtek. My contribution has only been to clean it up. Thanks for the patch. I too had found that checksum code, but I had not sent it as there are still problems on BE machines. These difficulties are running the NIC in STA mode. I have not tried AP mode. Scan data seem to be read OK, but it never authenticates. I do not know if there are further errors in setting up the transmit buffer, or if the problem is in the encryption/decryption code. I'm still looking. Larry
On Tuesday, September 6, 2016 8:29:32 AM CEST Larry Finger wrote: > On 09/06/2016 08:09 AM, Sven Eckelmann wrote: > > On Dienstag, 6. September 2016 09:40:41 CEST Sven Eckelmann wrote: > >> On Freitag, 2. September 2016 12:53:28 CEST Larry Finger wrote: > >> [...] > >> > >>> The patch I included in my previous E-mail, and attached here, does get > >>> the firmware loaded correctly. There is still a problem that prevents > >>> authentication. I'm still looking for that issue. > >> > >> Thanks for the fast update. I am currently testing your patch. It looks > >> like the initial error is now gone. The hostapd also starts but > >> beaconing doesn't seem to work at all (no error from the kernel/hostapd > >> but the device is not sending anything). I am currently checking how > >> beaconing is supposed to work in your driver. Maybe I will spot > >> something useful.> > > Yes, found something similar in the checksumming algorithm. See the > > attached patch for details. > > Just for the record, this is not "my" driver. It was provided by Realtek. My > contribution has only been to clean it up. > > Thanks for the patch. I too had found that checksum code, but I had not sent > it as there are still problems on BE machines. These difficulties are > running the NIC in STA mode. I have not tried AP mode. Scan data seem to be > read OK, but it never authenticates. I do not know if there are further > errors in setting up the transmit buffer, or if the problem is in the > encryption/decryption code. I'm still looking. just as a connected question here - do you know if those devices support MultiSSID? The capabilities currently don't allow that, but I'm wondering if that could be implemented, or if there are any hardware/firmware limitations? Thanks, Simon
From: Sven Eckelmann <sven@narfation.org> Date: Tue, 6 Sep 2016 15:00:27 +0200 Subject: [PATCH] Fix TX checksum on big endian systems --- drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c index 95880fe..6cb46ba 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c @@ -481,14 +481,14 @@ static void _rtl_fill_usb_tx_desc(u8 *txdesc) */ static void _rtl_tx_desc_checksum(u8 *txdesc) { - u16 *ptr = (u16 *)txdesc; + __le16 *ptr = (__le16 *)txdesc; u16 checksum = 0; u32 index; /* Clear first */ SET_TX_DESC_TX_DESC_CHECKSUM(txdesc, 0); for (index = 0; index < 16; index++) - checksum = checksum ^ (*(ptr + index)); + checksum = checksum ^ le16_to_cpu(*(ptr + index)); SET_TX_DESC_TX_DESC_CHECKSUM(txdesc, checksum); }