Search Linux Wireless

[PATCH 3/4] ath9k: Restore EEPROM regulatory upon STA disconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The current regulatory for world roaming mode cards might be
overriden by country IE from the assiciated AP. But these
regulatory values are failed to be restored on disconnection.
This patch ensures to resotre regulatry values at driver side.

Signed-off-by: Rajkumar Manoharan <rmanohar@xxxxxxxxxxxxxxxx>
---
 drivers/net/wireless/ath/ath9k/main.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 424289f..a4dbb7b 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2046,6 +2046,14 @@ static void ath9k_config_bss(struct ath_softc *sc, struct ieee80211_vif *vif)
 		sc->sc_flags &= ~SC_OP_ANI_RUN;
 		del_timer_sync(&common->ani.timer);
 		memset(&sc->caldata, 0, sizeof(sc->caldata));
+		/*
+		 * Restore regulatory values that might be updated
+		 * by country IEs.
+		 */
+		if (!ath_is_world_regd(&common->regulatory) &&
+		    ath_is_world_regd(&common->reg_world_copy))
+			memcpy(&common->regulatory, &common->reg_world_copy,
+			       sizeof(struct ath_regulatory));
 	}
 }
 
-- 
1.7.8

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux