summaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/330-ath9k-use-rmw-buffer-in-ath9k_hw_set_operating_mode-.patch
blob: 6ce3f40f05d5d1e98e0c81065710893d3a015cd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From: Oleksij Rempel <linux@rempel-privat.de>
Date: Sun, 22 Mar 2015 19:29:57 +0100
Subject: [PATCH] ath9k: use rmw buffer in ath9k_hw_set_operating_mode
 and ath9k_hw_reset

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---

--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1227,6 +1227,7 @@ static void ath9k_hw_set_operating_mode(
 	u32 mask = AR_STA_ID1_STA_AP | AR_STA_ID1_ADHOC;
 	u32 set = AR_STA_ID1_KSRCH_MODE;
 
+	ENABLE_REG_RMW_BUFFER(ah);
 	switch (opmode) {
 	case NL80211_IFTYPE_ADHOC:
 		if (!AR_SREV_9340_13(ah)) {
@@ -1248,6 +1249,7 @@ static void ath9k_hw_set_operating_mode(
 		break;
 	}
 	REG_RMW(ah, AR_STA_ID1, set, mask);
+	REG_RMW_BUFFER_FLUSH(ah);
 }
 
 void ath9k_hw_get_delta_slope_vals(struct ath_hw *ah, u32 coef_scaled,
@@ -1960,6 +1962,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
 	if (!ath9k_hw_mci_is_enabled(ah))
 		REG_WRITE(ah, AR_OBS, 8);
 
+	ENABLE_REG_RMW_BUFFER(ah);
 	if (ah->config.rx_intr_mitigation) {
 		REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, ah->config.rimt_last);
 		REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, ah->config.rimt_first);
@@ -1969,6 +1972,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
 		REG_RMW_FIELD(ah, AR_TIMT, AR_TIMT_LAST, 300);
 		REG_RMW_FIELD(ah, AR_TIMT, AR_TIMT_FIRST, 750);
 	}
+	REG_RMW_BUFFER_FLUSH(ah);
 
 	ath9k_hw_init_bb(ah, chan);
 
span> sudo dnf install make gcc redhat-rpm-config python3-pip python3-devel libffi-devel openssl-devel libtiff-devel libjpeg-devel zlib-devel libwebp-devel openjpeg2-devel sudo pip3 install mitmproxy # or pip install --user mitmproxy Make sure to have an up-to-date version of pip by running ``pip3 install -U pip``. Once installation is complete you can run :ref:`mitmproxy` or :ref:`mitmdump` from a terminal. .. _install-arch: Installation On Arch Linux -------------------------- mitmproxy has been added into the [community] repository. Use pacman to install it: >>> sudo pacman -S mitmproxy Once installation is complete you can run :ref:`mitmproxy` or :ref:`mitmdump` from a terminal. .. _install-macos: Installation On macOS ------------------------ You can use Homebrew to install everything: .. code:: bash brew install mitmproxy Or you can download the pre-built binary packages from `mitmproxy.org`_. Once installation is complete you can run :ref:`mitmproxy` or :ref:`mitmdump` from a terminal. .. _install-windows: Installation On Windows ----------------------- .. note:: Please note that mitmdump is the only component of mitmproxy that is supported on Windows at the moment. **There is no interactive user interface on Windows.** First, install the latest version of Python 3.5 from the `Python website`_. If you already have an older version of Python 3.5 installed, make sure to install pip_ (pip is included in Python by default). If pip aborts with an error, make sure you are using the current version of pip. .. code:: powershell python -m pip install --upgrade pip Next, add Python and the Python Scripts directory to your **PATH** variable. You can do this easily by running the following in powershell: .. code:: powershell [Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27;C:\Python27\Scripts", "User") Now, you can install mitmproxy by running .. code:: powershell pip install mitmproxy Once the installation is complete, you can run :ref:`mitmdump` from a command prompt. .. _install-source: Installation From Source ------------------------ If you would like to install mitmproxy directly from the master branch on GitHub or would like to get set up to contribute to the project, install the dependencies as you would for a regular mitmproxy installation. Then see the Hacking_ section of the README on GitHub. You can check your system information by running: ``mitmproxy --sysinfo`` .. _Hacking: https://github.com/mitmproxy/mitmproxy/blob/master/README.rst#hacking .. _mitmproxy.org: https://mitmproxy.org/ .. _`Python website`: https://www.python.org/downloads/windows/ .. _pip: https://pip.pypa.io/en/latest/installing.html .. _pyenv: https://github.com/yyuu/pyenv