Last active
June 12, 2020 14:36
-
-
Save alexalouit/e7a72f1c455db424722c2c4859aa8e87 to your computer and use it in GitHub Desktop.
compile atheros noregulatory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ apt-get install linux-headers-`uname -r` | |
| $ apt-get install linux-source | |
| $ mkdir -p ~/build/ath; cd ~/build/ath | |
| $ tar -xvf /usr/src/linux-source-`uname -r`.tar.xz | |
| # patch linux-source-`uname -r`/drivers/net/wireless/ath/regd.c | |
| $ cp /boot/config-`uname -r` ~/build/ath/.config | |
| $ cp /usr/src/linux-headers-`uname -r`/Module.symvers ~/build/ath/linux-source-`uname -r`/ | |
| $ cd linux-source-`uname -r` | |
| $ make oldconfig | |
| $ make prepare | |
| $ make scripts | |
| $ make SUBDIRS=drivers/net/wireless/ath modules | |
| $ install -b ~/build/ath/drivers/net/wireless/ath/ath.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/ath/ath.ko | |
| $ depmod -a | |
| $ iw reg set US | |
| $ nano /etc/default/crda | |
| # add US to REGDOMAIN | |
| # then reboot or load module by hand |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- drivers/net/wireless/ath/regd.c 2017-09-13 00:12:11.038844554 +0200 | |
| +++ drivers/net/wireless/ath/regd.c 2017-09-13 00:13:32.676068380 +0200 | |
| @@ -341,6 +341,8 @@ | |
| struct ieee80211_channel *ch; | |
| unsigned int i; | |
| + return; | |
| + | |
| for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| if (!wiphy->bands[band]) | |
| continue; | |
| @@ -374,6 +376,8 @@ | |
| { | |
| struct ieee80211_supported_band *sband; | |
| + return; | |
| + | |
| sband = wiphy->bands[NL80211_BAND_2GHZ]; | |
| if (!sband) | |
| return; | |
| @@ -402,6 +406,8 @@ | |
| struct ieee80211_channel *ch; | |
| unsigned int i; | |
| + return; | |
| + | |
| if (!wiphy->bands[NL80211_BAND_5GHZ]) | |
| return; | |
| @@ -632,6 +638,8 @@ | |
| { | |
| const struct ieee80211_regdomain *regd; | |
| + return 0; | |
| + | |
| wiphy->reg_notifier = reg_notifier; | |
| wiphy->regulatory_flags |= REGULATORY_STRICT_REG | | |
| REGULATORY_CUSTOM_REG; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment