Linksys WRT3200ACM and 5GHz WiFi Range

Hi. I have a Linksys WRT3200ACM with OpenWrt 19.07.4 and a very short 5ghz WiFi range.

This is /etc/config/wireless (5Ghz side)

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11a'
        option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
        option htmode 'VHT80'
        option channel '120'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option key 'mykey'
        option ssid 'MIWIFI5'
        option encryption 'psk2+ccmp'

I know that the router uses Marvell WiFi, so I'm using AES encryption cipher and default country code, but signal range is very poor.

  • Is this your actual country?
  • What is it?

Best networking upgrade I ever did was ditching my wrt32x devices in favor of eap225 access points. The marvell wifi drivers are terrible.

1 Like

Default = no change

  • That did not answer my question.
  • What country is "default"?
    • also, please tell us your country is different than the default

(But I'm sure that @dlakelan is very familiar with the individual device's capabilities.)

Default will be whatever is set in the device eeprom, it cannot be overridden, and the recommendation in the upstream repository is to not set the country code, as it can lead to issues. For example if you have an EU device, it will be FR, ain't nothing you can do about it, no matter where you may reside in the EU.

1 Like

that's right, the WRT3200/32x has several obnoxious hard-set values, including the country code, and it always outputs high power no matter what.

I am in EU. How to check country code on eeprom?

strings /dev/mtd3|sed -ne 's/^cert_region=//p'

the code

Also, execute "iw reg get" to ensure that all radios are configured to the same country.

1 Like
root@OpenWrt:~# strings /dev/mtd3|sed -ne 's/^cert_region=//p'
EU
root@OpenWrt:~# iw reg get
global
country FR: DFS-ETSI
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
        (5725 - 5875 @ 80), (N/A, 13), (N/A)
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#1
country FR: DFS-ETSI
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
        (5725 - 5875 @ 80), (N/A, 13), (N/A)
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#0
country FR: DFS-ETSI
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
        (5725 - 5875 @ 80), (N/A, 13), (N/A)
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

Looks fine to me.

So? Is back to stock the only option for me?

I’d set your wireless transmit power to a set number (20 is a normal setting). 5ghz is usually good for 1-2 rooms over (~10 meters). It has less penetration compared to 2.4ghz but the speed of 5ghz is worth it.

I’d sample your RSSI in your environment - I placed my APs high and away from obstruction. I found for my home that I needed two APs to get decent 5ghz coverage (quality drops off ~ -70dBm)

TX power is fixed at maximum, relative to selected channel.

Either his environment is killing his signal or the router is not doing it for his requirements.

I’d evaluate the environment concurrently to make sure we are not trying to send 5ghz through multiple concrete walls, etc :laughing:

I have seen reports by people in the EU getting some help by having their clients (not FR) to be in agreement with router wifi with:

patch
From 664cb677488e733ae7606a8f16c150496a96c544 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Santamar=C3=ADa=20Rogado?= <howl.nsp@gmail.com>
Date: Wed, 11 Sep 2019 22:41:51 +0200
Subject: [PATCH] mwlwifi: Don't lock system reg domain
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

mwlwifi forces the firmware hardcoded reg domain and this causes several issues.
This patch from McDebian makes mwlwifi to don't mess up the kernel reg domain.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
---
 .../kernel/mwlwifi/patches/002-regfree.patch  | 104 ++++++++++++++++++
 1 file changed, 104 insertions(+)
 create mode 100644 package/kernel/mwlwifi/patches/002-regfree.patch

diff --git a/package/kernel/mwlwifi/patches/002-regfree.patch b/package/kernel/mwlwifi/patches/002-regfree.patch
new file mode 100644
index 00000000000..8e476b20dfd
--- /dev/null
+++ b/package/kernel/mwlwifi/patches/002-regfree.patch
@@ -0,0 +1,104 @@
+--- a/core.c
++++ b/core.c
+@@ -858,11 +858,7 @@
+ 		mwl_fwcmd_get_txpwrlmt_cfg_data(hw);
+ 	}
+ 
+-	if (priv->chip_type == MWL8964)
+-		rc = mwl_fwcmd_get_fw_region_code_sc4(hw,
+-						      &priv->fw_region_code);
+-	else
+-		rc = mwl_fwcmd_get_fw_region_code(hw, &priv->fw_region_code);
++	rc = mwl_fwcmd_get_fw_region_code(hw, &priv->fw_region_code);
+ 	if (!rc) {
+ 		priv->fw_device_pwrtbl = true;
+ 		mwl_regd_init(priv);
+--- a/hif/fwcmd.c
++++ b/hif/fwcmd.c
+@@ -94,7 +94,6 @@
+ 		{ HOSTCMD_CMD_GET_DEVICE_PWR_TBL, "GetDevicePwrTbl" },
+ 		{ HOSTCMD_CMD_SET_RATE_DROP, "SetRateDrop" },
+ 		{ HOSTCMD_CMD_NEWDP_DMATHREAD_START, "NewdpDMAThreadStart" },
+-		{ HOSTCMD_CMD_GET_FW_REGION_CODE_SC4, "GetFwRegionCodeSC4" },
+ 		{ HOSTCMD_CMD_GET_DEVICE_PWR_TBL_SC4, "GetDevicePwrTblSC4" },
+ 		{ HOSTCMD_CMD_QUIET_MODE, "QuietMode" },
+ 		{ HOSTCMD_CMD_CORE_DUMP_DIAG_MODE, "CoreDumpDiagMode" },
+@@ -3431,42 +3430,6 @@
+ }
+ 
+ 
+-int mwl_fwcmd_get_fw_region_code_sc4(struct ieee80211_hw *hw,
+-				     u32 *fw_region_code)
+-{
+-	struct mwl_priv *priv = hw->priv;
+-	struct hostcmd_cmd_get_fw_region_code_sc4 *pcmd;
+-	u16 cmd;
+-
+-	pcmd = (struct hostcmd_cmd_get_fw_region_code_sc4 *)&priv->pcmd_buf[0];
+-
+-	mutex_lock(&priv->fwcmd_mutex);
+-
+-	memset(pcmd, 0x00, sizeof(*pcmd));
+-	cmd = HOSTCMD_CMD_GET_FW_REGION_CODE_SC4;
+-	pcmd->cmd_hdr.cmd = cpu_to_le16(cmd);
+-	pcmd->cmd_hdr.len = cpu_to_le16(sizeof(*pcmd));
+-
+-	if (mwl_hif_exec_cmd(hw, cmd)) {
+-		mutex_unlock(&priv->fwcmd_mutex);
+-		return -EIO;
+-	}
+-
+-	if (pcmd->cmd_hdr.result != 0) {
+-		mutex_unlock(&priv->fwcmd_mutex);
+-		return -EINVAL;
+-	}
+-
+-	if (pcmd->status)
+-		*fw_region_code = (pcmd->status == 1) ? 0 : pcmd->status;
+-	else
+-		*fw_region_code = le32_to_cpu(pcmd->fw_region_code);
+-
+-	mutex_unlock(&priv->fwcmd_mutex);
+-
+-	return 0;
+-}
+-
+ int mwl_fwcmd_get_pwr_tbl_sc4(struct ieee80211_hw *hw,
+ 			      struct mwl_device_pwr_tbl *device_ch_pwrtbl,
+ 			      u8 *region_code,
+--- a/hif/fwcmd.h
++++ b/hif/fwcmd.h
+@@ -253,9 +253,6 @@
+ 
+ int mwl_fwcmd_newdp_dmathread_start(struct ieee80211_hw *hw);
+ 
+-int mwl_fwcmd_get_fw_region_code_sc4(struct ieee80211_hw *hw,
+-				     u32 *fw_region_code);
+-
+ int mwl_fwcmd_get_pwr_tbl_sc4(struct ieee80211_hw *hw,
+ 			      struct mwl_device_pwr_tbl *device_ch_pwrtbl,
+ 			      u8 *region_code,
+--- a/hif/hostcmd.h
++++ b/hif/hostcmd.h
+@@ -73,7 +73,6 @@
+ #define HOSTCMD_CMD_GET_DEVICE_PWR_TBL          0x116B
+ #define HOSTCMD_CMD_SET_RATE_DROP               0x1172
+ #define HOSTCMD_CMD_NEWDP_DMATHREAD_START       0x1189
+-#define HOSTCMD_CMD_GET_FW_REGION_CODE_SC4      0x118A
+ #define HOSTCMD_CMD_GET_DEVICE_PWR_TBL_SC4      0x118B
+ #define HOSTCMD_CMD_QUIET_MODE                  0x1201
+ #define HOSTCMD_CMD_CORE_DUMP_DIAG_MODE         0x1202
+@@ -1110,13 +1109,6 @@
+ 	struct hostcmd_header cmd_hdr;
+ } __packed;
+ 
+-/* HOSTCMD_CMD_GET_FW_REGION_CODE_SC4 */
+-struct hostcmd_cmd_get_fw_region_code_sc4 {
+-	struct hostcmd_header cmd_hdr;
+-	__le32 status; /* 0 = Found, 1 = Error */
+-	__le32 fw_region_code;
+-} __packed;
+-
+ /* HOSTCMD_CMD_GET_DEVICE_PWR_TBL_SC4 */
+ #define HAL_TRPC_ID_MAX_SC4        32
+ #define MAX_GROUP_PER_CHANNEL_5G   39

which allows you to set the CC, but requires you to build the image. This does not provide any ability to override TX power

mwlwifi blows methane, but I have found most shortcomings can be resolved by stringing a CAT6, or sticking an EAP245 to the ceiling, followed by turning the radios off.

1 Like