Skip to contentSkip to conversation

Anyone using rtl8192de with 2.4GHz 802.11g?

DISCUSSION Forest Bond 2 participants 11 messages Jul 12, 2012 – Jul 13, 2012 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

Hi,

The rtl8192de driver is working fine for me at 5GHz, but I am having trouble getting scan results for 2.4GHz 802.11g networks. I have been doing a lot of debugging but am not making much progress. I suspect the 802.11 b/g/n phy is not being initialized correctly, but I'm pretty far outside my domain on this one.

Is anyone successfully using this driver with a 2.4GHz 802.11g network?

Thanks,
Forest

Signature · 3 lines
Forest Bond
http://www.alittletooquiet.net
http://www.rapidrollout.com
#1 lore raw
Quoted 9 lines · Forest Bond

Hi,

The rtl8192de driver is working fine for me at 5GHz, but I am having trouble getting scan results for 2.4GHz 802.11g networks. I have been doing a lot of debugging but am not making much progress. I suspect the 802.11 b/g/n phy is not being initialized correctly, but I'm pretty far outside my domain on this one.

Is anyone successfully using this driver with a 2.4GHz 802.11g network?

I have several different models - some work better than others. What is the PCI ID for yours?

Larry

#2 lore raw

Hi Larry,

Thanks for the quick reply.

Quoted 9 lines · Larry Finger
Quoted 8 lines · Forest Bond

Hi,

The rtl8192de driver is working fine for me at 5GHz, but I am having trouble getting scan results for 2.4GHz 802.11g networks. I have been doing a lot of debugging but am not making much progress. I suspect the 802.11 b/g/n phy is not being initialized correctly, but I'm pretty far outside my domain on this one.

Quoted 4 lines
Quoted 1 line

Is anyone successfully using this driver with a 2.4GHz 802.11g network?

I have several different models - some work better than others. What is the PCI ID for yours?

This is the one I have:

02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] 02:00.1 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] (rev 01)

Thanks,
Forest

Signature · 3 lines
Forest Bond
http://www.alittletooquiet.net
http://www.rapidrollout.com
#3 lore raw
Quoted 16 lines · Forest Bond

Hi Larry,

Thanks for the quick reply.

Quoted 11 lines · Larry Finger
Quoted 9 lines · Forest Bond

Hi,

The rtl8192de driver is working fine for me at 5GHz, but I am having trouble getting scan results for 2.4GHz 802.11g networks. I have been doing a lot of debugging but am not making much progress. I suspect the 802.11 b/g/n phy is not being initialized correctly, but I'm pretty far outside my domain on this one.

Is anyone successfully using this driver with a 2.4GHz 802.11g network?

Quoted 7 lines
Quoted 2 lines

I have several different models - some work better than others. What is the PCI ID for yours?

This is the one I have:

02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] 02:00.1 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] (rev 01)

It turns out that both kinds have the same ID. I think one of them is a prototype, while the other is probably a production unit. Obviously, bitrot has set in while I wasn't testing. With the kernel driver, neither unit can even scan in the 2.4 GHz band. Using the latest version of the vendor driver, the production version connects with APs running WEP, WPA, or WPA2. The prototype can only handle WEP.

Obviously, I have some work to do. In the meantime, I will send you a tarball containing the vendor driver - privately so as not to spam the list.

Larry

#4 lore raw

Hi Larry,

Quoted 27 lines · Larry Finger
Quoted 10 lines · Forest Bond
Quoted 9 lines · Larry Finger
Quoted 7 lines · Forest Bond

The rtl8192de driver is working fine for me at 5GHz, but I am having trouble getting scan results for 2.4GHz 802.11g networks. I have been doing a lot of debugging but am not making much progress. I suspect the 802.11 b/g/n phy is not being initialized correctly, but I'm pretty far outside my domain on this one.

Is anyone successfully using this driver with a 2.4GHz 802.11g network?

Quoted 7 lines
Quoted 2 lines

I have several different models - some work better than others. What is the PCI ID for yours?

This is the one I have:

02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] 02:00.1 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] (rev 01)

It turns out that both kinds have the same ID. I think one of them is a prototype, while the other is probably a production unit. Obviously, bitrot has set in while I wasn't testing. With the kernel driver, neither unit can even scan in the 2.4 GHz band. Using the latest version of the vendor driver, the production version connects with APs running WEP, WPA, or WPA2. The prototype can only handle WEP.

Quoted 3 lines

Obviously, I have some work to do. In the meantime, I will send you a tarball containing the vendor driver - privately so as not to spam the list.

Thank you, I appreciate that.

Of course, my preference would be to fix up the kernel driver. I don't mind doing some manual bisection with compat-wireless releases unless you think that would be a total waste of time. Do you have any sense for what the last working kernel version would have been?

As you suggest, we may need to use the vendor driver in the meantime. Thanks again for sending it over (although I suspect it is the same version I downloaded from Realtek's web site).

Thanks,
Forest

Signature · 3 lines
Forest Bond
http://www.alittletooquiet.net
http://www.rapidrollout.com
#5 lore raw
Quoted 36 lines · Forest Bond

Hi Larry,

Quoted 27 lines · Larry Finger
Quoted 10 lines · Forest Bond
Quoted 9 lines · Larry Finger
Quoted 7 lines · Forest Bond

The rtl8192de driver is working fine for me at 5GHz, but I am having trouble getting scan results for 2.4GHz 802.11g networks. I have been doing a lot of debugging but am not making much progress. I suspect the 802.11 b/g/n phy is not being initialized correctly, but I'm pretty far outside my domain on this one.

Is anyone successfully using this driver with a 2.4GHz 802.11g network?

Quoted 7 lines
Quoted 2 lines

I have several different models - some work better than others. What is the PCI ID for yours?

This is the one I have:

02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] 02:00.1 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] (rev 01)

It turns out that both kinds have the same ID. I think one of them is a prototype, while the other is probably a production unit. Obviously, bitrot has set in while I wasn't testing. With the kernel driver, neither unit can even scan in the 2.4 GHz band. Using the latest version of the vendor driver, the production version connects with APs running WEP, WPA, or WPA2. The prototype can only handle WEP.

Quoted 3 lines

Obviously, I have some work to do. In the meantime, I will send you a tarball containing the vendor driver - privately so as not to spam the list.

Thank you, I appreciate that.

Quoted 8 lines

Of course, my preference would be to fix up the kernel driver. I don't mind doing some manual bisection with compat-wireless releases unless you think that would be a total waste of time. Do you have any sense for what the last working kernel version would have been?

As you suggest, we may need to use the vendor driver in the meantime. Thanks again for sending it over (although I suspect it is the same version I downloaded from Realtek's web site).

It started with the Realtek version, but has some important bug fixes that I wanted you to have.

Of course, we want to fix the kernel version, but if you want to bisect compat-wireless, that would be a big help. In the meantime, I will try bisecting wireless-testing when I get a chance.

Larry

#6 lore raw

Hi Larry,

Quoted 40 lines · Larry Finger
Quoted 39 lines · Forest Bond
Quoted 27 lines · Larry Finger
Quoted 10 lines · Forest Bond
Quoted 9 lines · Larry Finger
Quoted 7 lines · Forest Bond

The rtl8192de driver is working fine for me at 5GHz, but I am having trouble getting scan results for 2.4GHz 802.11g networks. I have been doing a lot of debugging but am not making much progress. I suspect the 802.11 b/g/n phy is not being initialized correctly, but I'm pretty far outside my domain on this one.

Is anyone successfully using this driver with a 2.4GHz 802.11g network?

Quoted 7 lines
Quoted 2 lines

I have several different models - some work better than others. What is the PCI ID for yours?

This is the one I have:

02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] 02:00.1 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] (rev 01)

It turns out that both kinds have the same ID. I think one of them is a prototype, while the other is probably a production unit. Obviously, bitrot has set in while I wasn't testing. With the kernel driver, neither unit can even scan in the 2.4 GHz band. Using the latest version of the vendor driver, the production version connects with APs running WEP, WPA, or WPA2. The prototype can only handle WEP.

Quoted 3 lines

Obviously, I have some work to do. In the meantime, I will send you a tarball containing the vendor driver - privately so as not to spam the list.

Thank you, I appreciate that.

Of course, my preference would be to fix up the kernel driver. I don't mind doing some manual bisection with compat-wireless releases unless you think that would be a total waste of time. Do you have any sense for what the last working kernel version would have been?

Quoted 6 lines
Quoted 3 lines

As you suggest, we may need to use the vendor driver in the meantime. Thanks again for sending it over (although I suspect it is the same version I downloaded from Realtek's web site).

It started with the Realtek version, but has some important bug fixes that I wanted you to have.

Thanks, that's really helpful.

Quoted 3 lines

Of course, we want to fix the kernel version, but if you want to bisect compat-wireless, that would be a big help. In the meantime, I will try bisecting wireless-testing when I get a chance.

I have begun disecting compat-wireless releases. 3.1.1-1 works, 3.2.5-1 doesn't. I'm going to try to identify the commit that broke things by applying patches to 3.1.1-1.

Thanks,
Forest

Signature · 3 lines
Forest Bond
http://www.alittletooquiet.net
http://www.rapidrollout.com
#7 lore raw

Hi Larry,

Quoted 50 lines · Forest Bond
Quoted 40 lines · Larry Finger
Quoted 39 lines · Forest Bond
Quoted 27 lines · Larry Finger
Quoted 10 lines · Forest Bond
Quoted 9 lines · Larry Finger
Quoted 7 lines · Forest Bond

The rtl8192de driver is working fine for me at 5GHz, but I am having trouble getting scan results for 2.4GHz 802.11g networks. I have been doing a lot of debugging but am not making much progress. I suspect the 802.11 b/g/n phy is not being initialized correctly, but I'm pretty far outside my domain on this one.

Is anyone successfully using this driver with a 2.4GHz 802.11g network?

Quoted 7 lines
Quoted 2 lines

I have several different models - some work better than others. What is the PCI ID for yours?

This is the one I have:

02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] 02:00.1 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] (rev 01)

It turns out that both kinds have the same ID. I think one of them is a prototype, while the other is probably a production unit. Obviously, bitrot has set in while I wasn't testing. With the kernel driver, neither unit can even scan in the 2.4 GHz band. Using the latest version of the vendor driver, the production version connects with APs running WEP, WPA, or WPA2. The prototype can only handle WEP.

Quoted 3 lines

Obviously, I have some work to do. In the meantime, I will send you a tarball containing the vendor driver - privately so as not to spam the list.

Thank you, I appreciate that.

Of course, my preference would be to fix up the kernel driver. I don't mind doing some manual bisection with compat-wireless releases unless you think that would be a total waste of time. Do you have any sense for what the last working kernel version would have been?

Quoted 6 lines
Quoted 3 lines

As you suggest, we may need to use the vendor driver in the meantime. Thanks again for sending it over (although I suspect it is the same version I downloaded from Realtek's web site).

It started with the Realtek version, but has some important bug fixes that I wanted you to have.

Thanks, that's really helpful.

Quoted 7 lines
Quoted 3 lines

Of course, we want to fix the kernel version, but if you want to bisect compat-wireless, that would be a big help. In the meantime, I will try bisecting wireless-testing when I get a chance.

I have begun disecting compat-wireless releases. 3.1.1-1 works, 3.2.5-1 doesn't. I'm going to try to identify the commit that broke things by applying patches to 3.1.1-1.

So unless I screwed something up while bisecting, I think this is where things broke:

commit d83579e2a50ac68389e6b4c58b845c702cf37516

Author: Chaoming Li <[email protected]>
Date:   Tue Oct 11 21:28:51 2011 -0500

rtlwifi: rtl8192de: Updates from latest Reaktek driver - Part III

This patch incorporate the differences between the 06/20/2011 and 08/16/2011 Realtek releases of the rtl8192de driver.

The changes include:

1. Update for new chip versions

I managed to get into an interesting situation at one point during testing where neither MAC would return scan results, even after reverting to a known-good driver version. This was resolved by removing and re-applying power (i.e. a reboot did not fix it). Something must've put the hardware in a bad state. I haven't seen this problem again.

Anyway, I'll probably play with that patch a bit to see if I can figure out what broke, but let me know if you have any ideas.

Thanks,
Forest

Signature · 3 lines
Forest Bond
http://www.alittletooquiet.net
http://www.rapidrollout.com
#8 lore raw

Hi Larry,

Quoted 81 lines · Forest Bond
Quoted 50 lines · Forest Bond
Quoted 40 lines · Larry Finger
Quoted 39 lines · Forest Bond
Quoted 27 lines · Larry Finger
Quoted 10 lines · Forest Bond
Quoted 9 lines · Larry Finger
Quoted 7 lines · Forest Bond

The rtl8192de driver is working fine for me at 5GHz, but I am having trouble getting scan results for 2.4GHz 802.11g networks. I have been doing a lot of debugging but am not making much progress. I suspect the 802.11 b/g/n phy is not being initialized correctly, but I'm pretty far outside my domain on this one.

Is anyone successfully using this driver with a 2.4GHz 802.11g network?

Quoted 7 lines
Quoted 2 lines

I have several different models - some work better than others. What is the PCI ID for yours?

This is the one I have:

02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] 02:00.1 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] (rev 01)

It turns out that both kinds have the same ID. I think one of them is a prototype, while the other is probably a production unit. Obviously, bitrot has set in while I wasn't testing. With the kernel driver, neither unit can even scan in the 2.4 GHz band. Using the latest version of the vendor driver, the production version connects with APs running WEP, WPA, or WPA2. The prototype can only handle WEP.

Quoted 3 lines

Obviously, I have some work to do. In the meantime, I will send you a tarball containing the vendor driver - privately so as not to spam the list.

Thank you, I appreciate that.

Of course, my preference would be to fix up the kernel driver. I don't mind doing some manual bisection with compat-wireless releases unless you think that would be a total waste of time. Do you have any sense for what the last working kernel version would have been?

Quoted 6 lines
Quoted 3 lines

As you suggest, we may need to use the vendor driver in the meantime. Thanks again for sending it over (although I suspect it is the same version I downloaded from Realtek's web site).

It started with the Realtek version, but has some important bug fixes that I wanted you to have.

Thanks, that's really helpful.

Quoted 7 lines
Quoted 3 lines

Of course, we want to fix the kernel version, but if you want to bisect compat-wireless, that would be a big help. In the meantime, I will try bisecting wireless-testing when I get a chance.

I have begun disecting compat-wireless releases. 3.1.1-1 works, 3.2.5-1 doesn't. I'm going to try to identify the commit that broke things by applying patches to 3.1.1-1.

So unless I screwed something up while bisecting, I think this is where things broke:

commit d83579e2a50ac68389e6b4c58b845c702cf37516

Author: Chaoming Li <[email protected]>
Date:   Tue Oct 11 21:28:51 2011 -0500

rtlwifi: rtl8192de: Updates from latest Reaktek driver - Part III

This patch incorporate the differences between the 06/20/2011 and 08/16/2011 Realtek releases of the rtl8192de driver.

The changes include:

1. Update for new chip versions

Quoted 8 lines

I managed to get into an interesting situation at one point during testing where neither MAC would return scan results, even after reverting to a known-good driver version. This was resolved by removing and re-applying power (i.e. a reboot did not fix it). Something must've put the hardware in a bad state. I haven't seen this problem again.

Anyway, I'll probably play with that patch a bit to see if I can figure out what broke, but let me know if you have any ideas.

So this seems to fix things:

drivers/net/wireless/rtlwifi/rtl8192de/phy.c +7 -3
index 18380a7..be21c81 100644
@@ -3345,21 +3345,25 @@ void rtl92d_phy_config_macphymode_info(struct ieee80211_hw *hw)
 	switch (rtlhal->macphymode) {
 	case DUALMAC_SINGLEPHY:
 		rtlphy->rf_type = RF_2T2R;
-		rtlhal->version |= CHIP_92D_SINGLEPHY;
+		/*rtlhal->version |= CHIP_92D_SINGLEPHY;*/
+		rtlhal->version |= RF_TYPE_2T2R;
 		rtlhal->bandset = BAND_ON_BOTH;
 		rtlhal->current_bandtype = BAND_ON_2_4G;
 		break;
 
 	case SINGLEMAC_SINGLEPHY:
 		rtlphy->rf_type = RF_2T2R;
-		rtlhal->version |= CHIP_92D_SINGLEPHY;
+		/*rtlhal->version |= CHIP_92D_SINGLEPHY;*/
+		rtlhal->version |= RF_TYPE_2T2R;
 		rtlhal->bandset = BAND_ON_BOTH;
 		rtlhal->current_bandtype = BAND_ON_2_4G;
 		break;
 
 	case DUALMAC_DUALPHY:
 		rtlphy->rf_type = RF_1T1R;
-		rtlhal->version &= (~CHIP_92D_SINGLEPHY);
+		/*rtlhal->version &= (~CHIP_92D_SINGLEPHY);*/
+		rtlhal->version &= RF_TYPE_1T1R;
+
 		/* Now we let MAC0 run on 5G band. */
 		if (rtlhal->interfaceindex == 0) {
 			rtlhal->bandset = BAND_ON_5G;

And this is unrelated, but also seems important:

drivers/net/wireless/rtlwifi/rtl8192de/hw.c +4 -1
index b338d52..59e85f5 100644
@@ -1058,11 +1058,14 @@ static enum version_8192d _rtl92de_read_chip_version(struct ieee80211_hw *hw)
 	u32 value32;
 
 	value32 = rtl_read_dword(rtlpriv, REG_SYS_CFG);
+	version |= CHIP_92D;
+
 	if (!(value32 & 0x000f0000)) {
 		version = VERSION_TEST_CHIP_92D_SINGLEPHY;
 		RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "TEST CHIP!!!\n");
 	} else {
-		version = VERSION_NORMAL_CHIP_92D_SINGLEPHY;
+		/*version = VERSION_NORMAL_CHIP_92D_SINGLEPHY;*/
+		version |= NORMAL_CHIP;
 		RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "Normal CHIP!!!\n");
 	}
 	return version;

Let me know what you think. I can prepare some proper patches sometime tomorrow.

Thanks,
Forest

Signature · 3 lines
Forest Bond
http://www.alittletooquiet.net
http://www.rapidrollout.com
#9 lore raw
Quoted 155 lines · Forest Bond

Hi Larry,

Quoted 81 lines · Forest Bond
Quoted 50 lines · Forest Bond
Quoted 40 lines · Larry Finger
Quoted 39 lines · Forest Bond
Quoted 27 lines · Larry Finger
Quoted 10 lines · Forest Bond
Quoted 9 lines · Larry Finger
Quoted 7 lines · Forest Bond

The rtl8192de driver is working fine for me at 5GHz, but I am having trouble getting scan results for 2.4GHz 802.11g networks. I have been doing a lot of debugging but am not making much progress. I suspect the 802.11 b/g/n phy is not being initialized correctly, but I'm pretty far outside my domain on this one.

Is anyone successfully using this driver with a 2.4GHz 802.11g network?

Quoted 7 lines
Quoted 2 lines

I have several different models - some work better than others. What is the PCI ID for yours?

This is the one I have:

02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] 02:00.1 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] (rev 01)

It turns out that both kinds have the same ID. I think one of them is a prototype, while the other is probably a production unit. Obviously, bitrot has set in while I wasn't testing. With the kernel driver, neither unit can even scan in the 2.4 GHz band. Using the latest version of the vendor driver, the production version connects with APs running WEP, WPA, or WPA2. The prototype can only handle WEP.

Quoted 3 lines

Obviously, I have some work to do. In the meantime, I will send you a tarball containing the vendor driver - privately so as not to spam the list.

Thank you, I appreciate that.

Of course, my preference would be to fix up the kernel driver. I don't mind doing some manual bisection with compat-wireless releases unless you think that would be a total waste of time. Do you have any sense for what the last working kernel version would have been?

Quoted 6 lines
Quoted 3 lines

As you suggest, we may need to use the vendor driver in the meantime. Thanks again for sending it over (although I suspect it is the same version I downloaded from Realtek's web site).

It started with the Realtek version, but has some important bug fixes that I wanted you to have.

Thanks, that's really helpful.

Quoted 7 lines
Quoted 3 lines

Of course, we want to fix the kernel version, but if you want to bisect compat-wireless, that would be a big help. In the meantime, I will try bisecting wireless-testing when I get a chance.

I have begun disecting compat-wireless releases. 3.1.1-1 works, 3.2.5-1 doesn't. I'm going to try to identify the commit that broke things by applying patches to 3.1.1-1.

So unless I screwed something up while bisecting, I think this is where things broke:

commit d83579e2a50ac68389e6b4c58b845c702cf37516

Author: Chaoming Li <[email protected]>
Date:   Tue Oct 11 21:28:51 2011 -0500

rtlwifi: rtl8192de: Updates from latest Reaktek driver - Part III

This patch incorporate the differences between the 06/20/2011 and 08/16/2011 Realtek releases of the rtl8192de driver.

The changes include:

1. Update for new chip versions

Quoted 8 lines

I managed to get into an interesting situation at one point during testing where neither MAC would return scan results, even after reverting to a known-good driver version. This was resolved by removing and re-applying power (i.e. a reboot did not fix it). Something must've put the hardware in a bad state. I haven't seen this problem again.

Anyway, I'll probably play with that patch a bit to see if I can figure out what broke, but let me know if you have any ideas.

So this seems to fix things:

drivers/net/wireless/rtlwifi/rtl8192de/phy.c +7 -3
index 18380a7..be21c81 100644
@@ -3345,21 +3345,25 @@ void rtl92d_phy_config_macphymode_info(struct ieee80211_hw *hw)
  	switch (rtlhal->macphymode) {
  	case DUALMAC_SINGLEPHY:
  		rtlphy->rf_type = RF_2T2R;
-		rtlhal->version |= CHIP_92D_SINGLEPHY;
+		/*rtlhal->version |= CHIP_92D_SINGLEPHY;*/
+		rtlhal->version |= RF_TYPE_2T2R;
  		rtlhal->bandset = BAND_ON_BOTH;
  		rtlhal->current_bandtype = BAND_ON_2_4G;
  		break;
 
  	case SINGLEMAC_SINGLEPHY:
  		rtlphy->rf_type = RF_2T2R;
-		rtlhal->version |= CHIP_92D_SINGLEPHY;
+		/*rtlhal->version |= CHIP_92D_SINGLEPHY;*/
+		rtlhal->version |= RF_TYPE_2T2R;
  		rtlhal->bandset = BAND_ON_BOTH;
  		rtlhal->current_bandtype = BAND_ON_2_4G;
  		break;
 
  	case DUALMAC_DUALPHY:
  		rtlphy->rf_type = RF_1T1R;
-		rtlhal->version &= (~CHIP_92D_SINGLEPHY);
+		/*rtlhal->version &= (~CHIP_92D_SINGLEPHY);*/
+		rtlhal->version &= RF_TYPE_1T1R;
+
  		/* Now we let MAC0 run on 5G band. */
  		if (rtlhal->interfaceindex == 0) {
  			rtlhal->bandset = BAND_ON_5G;

And this is unrelated, but also seems important:

drivers/net/wireless/rtlwifi/rtl8192de/hw.c +4 -1
index b338d52..59e85f5 100644
@@ -1058,11 +1058,14 @@ static enum version_8192d _rtl92de_read_chip_version(struct ieee80211_hw *hw)
  	u32 value32;
 
  	value32 = rtl_read_dword(rtlpriv, REG_SYS_CFG);
+	version |= CHIP_92D;
+
  	if (!(value32 & 0x000f0000)) {
  		version = VERSION_TEST_CHIP_92D_SINGLEPHY;
  		RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "TEST CHIP!!!\n");
  	} else {
-		version = VERSION_NORMAL_CHIP_92D_SINGLEPHY;
+		/*version = VERSION_NORMAL_CHIP_92D_SINGLEPHY;*/
+		version |= NORMAL_CHIP;
  		RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "Normal CHIP!!!\n");
  	}
  	return version;
Quoted 2 lines

Let me know what you think. I can prepare some proper patches sometime tomorrow.

All of those match the code in the 0816.2011 driver. I have no idea what went wrong earlier, but I think those patches are OK.

Larry

#10 lore raw

Hi Larry,

Quoted 154 lines · Larry Finger
Quoted 153 lines · Forest Bond
Quoted 81 lines · Forest Bond
Quoted 50 lines · Forest Bond
Quoted 40 lines · Larry Finger
Quoted 39 lines · Forest Bond
Quoted 27 lines · Larry Finger
Quoted 10 lines · Forest Bond
Quoted 9 lines · Larry Finger
Quoted 7 lines · Forest Bond

The rtl8192de driver is working fine for me at 5GHz, but I am having trouble getting scan results for 2.4GHz 802.11g networks. I have been doing a lot of debugging but am not making much progress. I suspect the 802.11 b/g/n phy is not being initialized correctly, but I'm pretty far outside my domain on this one.

Is anyone successfully using this driver with a 2.4GHz 802.11g network?

Quoted 7 lines
Quoted 2 lines

I have several different models - some work better than others. What is the PCI ID for yours?

This is the one I have:

02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] 02:00.1 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8193] (rev 01)

It turns out that both kinds have the same ID. I think one of them is a prototype, while the other is probably a production unit. Obviously, bitrot has set in while I wasn't testing. With the kernel driver, neither unit can even scan in the 2.4 GHz band. Using the latest version of the vendor driver, the production version connects with APs running WEP, WPA, or WPA2. The prototype can only handle WEP.

Quoted 3 lines

Obviously, I have some work to do. In the meantime, I will send you a tarball containing the vendor driver - privately so as not to spam the list.

Thank you, I appreciate that.

Of course, my preference would be to fix up the kernel driver. I don't mind doing some manual bisection with compat-wireless releases unless you think that would be a total waste of time. Do you have any sense for what the last working kernel version would have been?

Quoted 6 lines
Quoted 3 lines

As you suggest, we may need to use the vendor driver in the meantime. Thanks again for sending it over (although I suspect it is the same version I downloaded from Realtek's web site).

It started with the Realtek version, but has some important bug fixes that I wanted you to have.

Thanks, that's really helpful.

Quoted 7 lines
Quoted 3 lines

Of course, we want to fix the kernel version, but if you want to bisect compat-wireless, that would be a big help. In the meantime, I will try bisecting wireless-testing when I get a chance.

I have begun disecting compat-wireless releases. 3.1.1-1 works, 3.2.5-1 doesn't. I'm going to try to identify the commit that broke things by applying patches to 3.1.1-1.

So unless I screwed something up while bisecting, I think this is where things broke:

commit d83579e2a50ac68389e6b4c58b845c702cf37516

Author: Chaoming Li <[email protected]>
Date:   Tue Oct 11 21:28:51 2011 -0500

rtlwifi: rtl8192de: Updates from latest Reaktek driver - Part III

This patch incorporate the differences between the 06/20/2011 and 08/16/2011 Realtek releases of the rtl8192de driver.

The changes include:

1. Update for new chip versions

Quoted 8 lines

I managed to get into an interesting situation at one point during testing where neither MAC would return scan results, even after reverting to a known-good driver version. This was resolved by removing and re-applying power (i.e. a reboot did not fix it). Something must've put the hardware in a bad state. I haven't seen this problem again.

Anyway, I'll probably play with that patch a bit to see if I can figure out what broke, but let me know if you have any ideas.

So this seems to fix things:

drivers/net/wireless/rtlwifi/rtl8192de/phy.c +7 -3
index 18380a7..be21c81 100644
@@ -3345,21 +3345,25 @@ void rtl92d_phy_config_macphymode_info(struct ieee80211_hw *hw)
 	switch (rtlhal->macphymode) {
 	case DUALMAC_SINGLEPHY:
 		rtlphy->rf_type = RF_2T2R;
-		rtlhal->version |= CHIP_92D_SINGLEPHY;
+		/*rtlhal->version |= CHIP_92D_SINGLEPHY;*/
+		rtlhal->version |= RF_TYPE_2T2R;
 		rtlhal->bandset = BAND_ON_BOTH;
 		rtlhal->current_bandtype = BAND_ON_2_4G;
 		break;
 
 	case SINGLEMAC_SINGLEPHY:
 		rtlphy->rf_type = RF_2T2R;
-		rtlhal->version |= CHIP_92D_SINGLEPHY;
+		/*rtlhal->version |= CHIP_92D_SINGLEPHY;*/
+		rtlhal->version |= RF_TYPE_2T2R;
 		rtlhal->bandset = BAND_ON_BOTH;
 		rtlhal->current_bandtype = BAND_ON_2_4G;
 		break;
 
 	case DUALMAC_DUALPHY:
 		rtlphy->rf_type = RF_1T1R;
-		rtlhal->version &= (~CHIP_92D_SINGLEPHY);
+		/*rtlhal->version &= (~CHIP_92D_SINGLEPHY);*/
+		rtlhal->version &= RF_TYPE_1T1R;
+
 		/* Now we let MAC0 run on 5G band. */
 		if (rtlhal->interfaceindex == 0) {
 			rtlhal->bandset = BAND_ON_5G;

And this is unrelated, but also seems important:

drivers/net/wireless/rtlwifi/rtl8192de/hw.c +4 -1
index b338d52..59e85f5 100644
@@ -1058,11 +1058,14 @@ static enum version_8192d _rtl92de_read_chip_version(struct ieee80211_hw *hw)
 	u32 value32;
 
 	value32 = rtl_read_dword(rtlpriv, REG_SYS_CFG);
+	version |= CHIP_92D;
+
 	if (!(value32 & 0x000f0000)) {
 		version = VERSION_TEST_CHIP_92D_SINGLEPHY;
 		RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "TEST CHIP!!!\n");
 	} else {
-		version = VERSION_NORMAL_CHIP_92D_SINGLEPHY;
+		/*version = VERSION_NORMAL_CHIP_92D_SINGLEPHY;*/
+		version |= NORMAL_CHIP;
 		RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "Normal CHIP!!!\n");
 	}
 	return version;
Quoted 5 lines
Quoted 2 lines

Let me know what you think. I can prepare some proper patches sometime tomorrow.

All of those match the code in the 0816.2011 driver. I have no idea what went wrong earlier, but I think those patches are OK.

Okay, I sent a patch off that fixes the scanning issue. The other change turned out to be a no-op.

I'd like to tackle some clean-up work for the version calculation logic at some point, as there are likely some other bugs there. For instance, I'm pretty sure in the dual-mac, dual-phy case we end up with both RF_TYPE_1T1R and RF_TYPE_2T2R set since VERSION_NORMAL_CHIP_92D_SINGLEPHY implies RF_TYPE_2T2R. And, bugs aside, the code is a bit difficult to understand, which I imagine makes it harder to avoid introducing new bugs, particularly when integrating changes from the vendor driver.

Thanks,
Forest

Signature · 3 lines
Forest Bond
http://www.alittletooquiet.net
http://www.rapidrollout.com