mac80211: ath: add extra 'regulatory domains' for sanitize

This commit is contained in:
coolsnowwolf 2019-01-24 14:22:27 +08:00
parent 07ca47b256
commit 67536373d9

View File

@ -0,0 +1,18 @@
Index: backports-4.19.7-1/drivers/net/wireless/ath/regd.c
===================================================================
--- backports-4.19.7-1.orig/drivers/net/wireless/ath/regd.c
+++ backports-4.19.7-1/drivers/net/wireless/ath/regd.c
@@ -703,6 +703,12 @@ ath_regd_init_wiphy(struct ath_regulator
*/
static void ath_regd_sanitize(struct ath_regulatory *reg)
{
+ /*
+ * This will sanitize the following values:
+ * - 0x834b -> in the Linksys EA6350v3
+ * - 0x8000 -> some manufacturers use this invalid code
+ */
- if (reg->current_rd != COUNTRY_ERD_FLAG)
+ if (reg->current_rd != COUNTRY_ERD_FLAG &&
+ reg->current_rd != 0x834b)
return;
printk(KERN_DEBUG "ath: EEPROM regdomain sanitized\n");