* Re: [PATCHv3 0/5] ath10k: Allow setting coverage class and rx cleanups
From: Valo, Kalle @ 2016-09-09 14:59 UTC (permalink / raw)
To: Benjamin Berg
Cc: ath10k@lists.infradead.org, Simon Wunderlich,
Thiagarajan, Vasanthakumar, Sebastian Gottschall,
michal.kazior@tieto.com, Mathias Kretschmer,
linux-wireless@vger.kernel.org
In-Reply-To: <20160829144557.11678-1-benjamin@sipsolutions.net>
Benjamin Berg <benjamin@sipsolutions.net> writes:
> OK, another revision adding the fast path as suggested by Ben Greear. Onl=
y
> other change is that I am submitting it together with Vasanthakumar's cle=
anup
> patches to allow merging both into ath-next in one go.
>
> Changes in v4:
> * Only queue register setting work if coverage class is non-zero
> * Add cleanup patches from Vasanthakumar into series
>
> Changes in v3:
> * Only update register values if hardware is initialized
> * Use the SM/MS macros instead of manual bitshifts and masks
> * Use the hardware phyclk register instead of assuming a clock speed
> * Force dbglog_mask of ~0 and dbglog_level of at least WARN if active
> * Only call code for selected WMI events
>
> The last two items are a bit of a guess for me. In particular it looks li=
ke
> the default log level is already WARN, but I suppose that this should be =
good
> enough to get reports for internal chip resets. I have no way of verifyin=
g
> this myself though.
>
>
> Benjamin Berg (1):
> ath10k: Allow setting coverage class
>
> Vasanthakumar Thiagarajan (4):
> ath10k: Move ath10k_hw_params definition to hw.h
> ath10k: Add provision for Rx descriptor abstraction
> ath10k: Properly remove padding from the start of rx payload
> ath10k: Remove 4-addr padding related hw_param configuration
There were few conflicts, though easy. Please double check the pending
branch that I didn't make any mistakes, I didn't test these yet.
https://git.kernel.org/cgit/linux/kernel/git/kvalo/ath.git/log/?h=3Dpending
Also please CC linux-wireless when submitting ath10k patches, we get
wider review that way. Added it to CC now.
My log of the conflicts:
Applying: ath10k: Move ath10k_hw_params definition to hw.h
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging drivers/net/wireless/ath/ath10k/core.h
CONFLICT (content): Merge conflict in drivers/net/wireless/ath/ath10k/core.=
h
Failed to merge in the changes.
Patch failed at 0001 ath10k: Move ath10k_hw_params definition to hw.h
moved: bool sw_decrypt_mcast_mgmt;
Applying: ath10k: Add provision for Rx descriptor abstraction
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging drivers/net/wireless/ath/ath10k/hw.h
CONFLICT (content): Merge conflict in drivers/net/wireless/ath/ath10k/hw.h
Auto-merging drivers/net/wireless/ath/ath10k/core.c
CONFLICT (content): Merge conflict in drivers/net/wireless/ath/ath10k/core.=
c
Failed to merge in the changes.
Patch failed at 0002 ath10k: Add provision for Rx descriptor abstraction
Applying: ath10k: Allow setting coverage class
fatal: sha1 information is lacking or useless (drivers/net/wireless/ath/ath=
10k/core.c).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 ath10k: Allow setting coverage class
CONFLICT (content): Merge conflict in drivers/net/wireless/ath/ath10k/mac=
.c
patching file drivers/net/wireless/ath/ath10k/core.c
Hunk #1 succeeded at 1548 (offset 5 lines).
Hunk #2 succeeded at 2333 with fuzz 2 (offset 73 lines).
patching file drivers/net/wireless/ath/ath10k/core.h
Hunk #1 succeeded at 911 with fuzz 2 (offset 21 lines).
patching file drivers/net/wireless/ath/ath10k/hw.c
patching file drivers/net/wireless/ath/ath10k/hw.h
Hunk #2 succeeded at 416 (offset 5 lines).
Hunk #3 succeeded at 613 (offset 5 lines).
Hunk #4 succeeded at 813 (offset 5 lines).
patching file drivers/net/wireless/ath/ath10k/mac.c
Hunk #1 succeeded at 5410 (offset 38 lines).
Hunk #2 succeeded at 7449 (offset 38 lines).
Hunk #3 succeeded at 8027 (offset 38 lines).
patching file drivers/net/wireless/ath/ath10k/wmi.c
Hunk #1 succeeded at 4925 (offset 46 lines).
Hunk #2 succeeded at 4962 (offset 46 lines).
Hunk #3 succeeded at 4972 (offset 46 lines).
Hunk #4 succeeded at 4999 (offset 46 lines).
Hunk #5 succeeded at 5055 (offset 46 lines).
Hunk #6 succeeded at 5099 (offset 46 lines).
Hunk #7 succeeded at 5109 (offset 46 lines).
Hunk #8 succeeded at 5136 (offset 46 lines).
Hunk #9 succeeded at 5183 (offset 46 lines).
Hunk #10 succeeded at 5230 (offset 59 lines).
Hunk #11 succeeded at 5240 (offset 59 lines).
Hunk #12 succeeded at 5267 (offset 59 lines).
Hunk #13 succeeded at 5305 (offset 59 lines).
Hunk #14 succeeded at 5379 (offset 72 lines).
Hunk #15 succeeded at 5396 (offset 72 lines).
Hunk #16 succeeded at 5413 (offset 72 lines).
Hunk #17 succeeded at 6137 (offset 73 lines).
--=20
Kalle Valo=
^ permalink raw reply
* [PATCH] rtlbt: Add RTL8822BE Bluetooth device
From: Larry Finger @ 2016-09-09 15:02 UTC (permalink / raw)
To: kvalo, Marcel Holtmann
Cc: devel, linux-wireless, Larry Finger, linux-bluetooth,
陆朱伟
The RTL8822BE is a new Realtek wifi and BT device. Support for the BT
part is hereby added.
As this device is similar to most of the other Realtek BT devices, the
changes are minimal. The main difference is that the 8822BE needs a
configuration file for enabling and disabling features. Thus code is
added to select and load this configuration file. Although not needed
at the moment, hooks are added for the other devices that might need
such configuration files.
One additional change is to the routine that tests that the project
ID contained in the firmware matches the hardware. As the project IDs
are not sequential, continuing to use the position in the array as the
expected value of the ID would require adding extra unused entries in
the table, and any subsequant rearrangment of the array would break the
code. To fix these problems, the array elements now contain both the
hardware ID and the expected value for the project ID.
Signed-off-by: 陆朱伟 <alex_lu@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
drivers/bluetooth/btrtl.c | 104 ++++++++++++++++++++++++++++++++++++++++------
drivers/bluetooth/btrtl.h | 5 +++
2 files changed, 97 insertions(+), 12 deletions(-)
diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index 8428893..cb73863 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -33,6 +33,7 @@
#define RTL_ROM_LMP_8723B 0x8723
#define RTL_ROM_LMP_8821A 0x8821
#define RTL_ROM_LMP_8761A 0x8761
+#define RTL_ROM_LMP_8822B 0x8822
static int rtl_read_rom_version(struct hci_dev *hdev, u8 *version)
{
@@ -78,11 +79,12 @@ static int rtl8723b_parse_firmware(struct hci_dev *hdev, u16 lmp_subver,
const unsigned char *patch_length_base, *patch_offset_base;
u32 patch_offset = 0;
u16 patch_length, num_patches;
- const u16 project_id_to_lmp_subver[] = {
- RTL_ROM_LMP_8723A,
- RTL_ROM_LMP_8723B,
- RTL_ROM_LMP_8821A,
- RTL_ROM_LMP_8761A
+ const struct lmp_subver project_id_to_lmp_subver[] = {
+ {RTL_ROM_LMP_8723A, 0},
+ {RTL_ROM_LMP_8723B, 1},
+ {RTL_ROM_LMP_8821A, 2},
+ {RTL_ROM_LMP_8761A, 3},
+ {RTL_ROM_LMP_8822B, 8},
};
ret = rtl_read_rom_version(hdev, &rom_version);
@@ -134,14 +136,20 @@ static int rtl8723b_parse_firmware(struct hci_dev *hdev, u16 lmp_subver,
return -EINVAL;
}
- if (project_id >= ARRAY_SIZE(project_id_to_lmp_subver)) {
+ /* Find project_id in table */
+ for (i = 0; i < ARRAY_SIZE(project_id_to_lmp_subver); i++) {
+ if (project_id == project_id_to_lmp_subver[i].id)
+ break;
+ }
+
+ if (i >= ARRAY_SIZE(project_id_to_lmp_subver)) {
BT_ERR("%s: unknown project id %d", hdev->name, project_id);
return -EINVAL;
}
- if (lmp_subver != project_id_to_lmp_subver[project_id]) {
+ if (lmp_subver != project_id_to_lmp_subver[i].lmp_subver) {
BT_ERR("%s: firmware is for %x but this is a %x", hdev->name,
- project_id_to_lmp_subver[project_id], lmp_subver);
+ project_id_to_lmp_subver[i].lmp_subver, lmp_subver);
return -EINVAL;
}
@@ -257,6 +265,26 @@ out:
return ret;
}
+static int rtl_load_config(struct hci_dev *hdev, const char *name, u8 **buff)
+{
+ const struct firmware *fw;
+ int ret;
+
+ BT_INFO("%s: rtl: loading %s", hdev->name, name);
+ ret = request_firmware(&fw, name, &hdev->dev);
+ if (ret < 0) {
+ BT_ERR("%s: Failed to load %s", hdev->name, name);
+ return ret;
+ }
+
+ ret = fw->size;
+ *buff = kmemdup(fw->data, ret, GFP_KERNEL);
+
+ release_firmware(fw);
+
+ return ret;
+}
+
static int btrtl_setup_rtl8723a(struct hci_dev *hdev)
{
const struct firmware *fw;
@@ -296,25 +324,74 @@ static int btrtl_setup_rtl8723b(struct hci_dev *hdev, u16 lmp_subver,
unsigned char *fw_data = NULL;
const struct firmware *fw;
int ret;
+ int cfg_sz;
+ u8 *cfg_buff = NULL;
+ u8 *tbuff;
+ char *cfg_name = NULL;
+
+ switch (lmp_subver) {
+ case RTL_ROM_LMP_8723B:
+ cfg_name = "rtl_bt/rtl8723b_config.bin";
+ break;
+ case RTL_ROM_LMP_8821A:
+ cfg_name = "rtl_bt/rtl8821a_config.bin";
+ break;
+ case RTL_ROM_LMP_8761A:
+ cfg_name = "rtl_bt/rtl8761a_config.bin";
+ break;
+ case RTL_ROM_LMP_8822B:
+ cfg_name = "rtl_bt/rtl8822b_config.bin";
+ break;
+ default:
+ BT_ERR("%s: rtl: no config according to lmp_subver %04x",
+ hdev->name, lmp_subver);
+ break;
+ }
+
+ if (cfg_name) {
+ cfg_sz = rtl_load_config(hdev, cfg_name, &cfg_buff);
+ if (cfg_sz < 0)
+ cfg_sz = 0;
+ } else
+ cfg_sz = 0;
BT_INFO("%s: rtl: loading %s", hdev->name, fw_name);
ret = request_firmware(&fw, fw_name, &hdev->dev);
if (ret < 0) {
BT_ERR("%s: Failed to load %s", hdev->name, fw_name);
- return ret;
+ goto err_req_fw;
}
ret = rtl8723b_parse_firmware(hdev, lmp_subver, fw, &fw_data);
if (ret < 0)
goto out;
+ if (cfg_sz) {
+ tbuff = kzalloc(ret + cfg_sz, GFP_KERNEL);
+ if (!tbuff) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ memcpy(tbuff, fw_data, ret);
+ kfree(fw_data);
+
+ memcpy(tbuff + ret, cfg_buff, cfg_sz);
+ ret += cfg_sz;
+
+ fw_data = tbuff;
+ }
+
+ BT_INFO("cfg_sz %d, total size %d", cfg_sz, ret);
+
ret = rtl_download_firmware(hdev, fw_data, ret);
- kfree(fw_data);
- if (ret < 0)
- goto out;
out:
release_firmware(fw);
+ kfree(fw_data);
+err_req_fw:
+ if (cfg_sz)
+ kfree(cfg_buff);
return ret;
}
@@ -377,6 +454,9 @@ int btrtl_setup_realtek(struct hci_dev *hdev)
case RTL_ROM_LMP_8761A:
return btrtl_setup_rtl8723b(hdev, lmp_subver,
"rtl_bt/rtl8761a_fw.bin");
+ case RTL_ROM_LMP_8822B:
+ return btrtl_setup_rtl8723b(hdev, lmp_subver,
+ "rtl_bt/rtl8822b_fw.bin");
default:
BT_INFO("rtl: assuming no firmware upload needed.");
return 0;
diff --git a/drivers/bluetooth/btrtl.h b/drivers/bluetooth/btrtl.h
index 38ffe48..79f8801 100644
--- a/drivers/bluetooth/btrtl.h
+++ b/drivers/bluetooth/btrtl.h
@@ -38,6 +38,11 @@ struct rtl_epatch_header {
__le16 num_patches;
} __packed;
+struct lmp_subver {
+ __u16 lmp_subver;
+ __u8 id;
+};
+
#if IS_ENABLED(CONFIG_BT_RTL)
int btrtl_setup_realtek(struct hci_dev *hdev);
--
2.6.6
^ permalink raw reply related
* [PATCH] mwifiex: parse device tree node for PCIe
From: Amitkumar Karwar @ 2016-09-09 15:17 UTC (permalink / raw)
To: linux-wireless
Cc: Cathy Luo, Nishant Sarmukadam, devicetree, Wei-Ning Huang,
Xinming Hu, Amitkumar Karwar
From: Xinming Hu <huxm@marvell.com>
This patch derives device tree node from pcie bus layer framework.
Device tree bindings file has been renamed(marvell-sd8xxx.txt ->
marvell-8xxx.txt) to accomodate PCIe changes.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
.../bindings/net/wireless/marvell-8xxx.txt | 64 ++++++++++++++++++++++
.../bindings/net/wireless/marvell-sd8xxx.txt | 63 ---------------------
drivers/net/wireless/marvell/mwifiex/pcie.c | 19 +++++++
drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 3 +-
4 files changed, 85 insertions(+), 64 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt
delete mode 100644 Documentation/devicetree/bindings/net/wireless/marvell-sd8xxx.txt
diff --git a/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt b/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt
new file mode 100644
index 0000000..a8a95aa
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt
@@ -0,0 +1,64 @@
+Marvell 8897/8997 (sd8897/sd8997/pcie8997) SDIO/PCIE devices
+------
+
+This node provides properties for controlling the marvell sdio/pcie wireless device.
+The node is expected to be specified as a child node to the SDIO/PCIE controller that
+connects the device to the system.
+
+Required properties:
+
+ - compatible : should be one of the following:
+ * "marvell,sd8897"
+ * "marvell,sd8997"
+ * "marvell,pcie8997"
+
+Optional properties:
+
+ - marvell,caldata* : A series of properties with marvell,caldata prefix,
+ represent calibration data downloaded to the device during
+ initialization. This is an array of unsigned 8-bit values.
+ the properties should follow below property name and
+ corresponding array length:
+ "marvell,caldata-txpwrlimit-2g" (length = 566).
+ "marvell,caldata-txpwrlimit-5g-sub0" (length = 502).
+ "marvell,caldata-txpwrlimit-5g-sub1" (length = 688).
+ "marvell,caldata-txpwrlimit-5g-sub2" (length = 750).
+ "marvell,caldata-txpwrlimit-5g-sub3" (length = 502).
+ - marvell,wakeup-pin : a wakeup pin number of wifi chip which will be configured
+ to firmware. Firmware will wakeup the host using this pin
+ during suspend/resume.
+ - interrupt-parent: phandle of the parent interrupt controller
+ - interrupts : interrupt pin number to the cpu. driver will request an irq based on
+ this interrupt number. during system suspend, the irq will be enabled
+ so that the wifi chip can wakeup host platform under certain condition.
+ during system resume, the irq will be disabled to make sure
+ unnecessary interrupt is not received.
+
+Example:
+
+Tx power limit calibration data is configured in below example.
+The calibration data is an array of unsigned values, the length
+can vary between hw versions.
+IRQ pin 38 is used as system wakeup source interrupt. wakeup pin 3 is configured
+so that firmware can wakeup host using this device side pin.
+
+&mmc3 {
+ status = "okay";
+ vmmc-supply = <&wlan_en_reg>;
+ bus-width = <4>;
+ cap-power-off-card;
+ keep-power-in-suspend;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ mwifiex: wifi@1 {
+ compatible = "marvell,sd8897";
+ reg = <1>;
+ interrupt-parent = <&pio>;
+ interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
+
+ marvell,caldata_00_txpwrlimit_2g_cfg_set = /bits/ 8 <
+ 0x01 0x00 0x06 0x00 0x08 0x02 0x89 0x01>;
+ marvell,wakeup-pin = <3>;
+ };
+};
diff --git a/Documentation/devicetree/bindings/net/wireless/marvell-sd8xxx.txt b/Documentation/devicetree/bindings/net/wireless/marvell-sd8xxx.txt
deleted file mode 100644
index c421aba..0000000
--- a/Documentation/devicetree/bindings/net/wireless/marvell-sd8xxx.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-Marvell 8897/8997 (sd8897/sd8997) SDIO devices
-------
-
-This node provides properties for controlling the marvell sdio wireless device.
-The node is expected to be specified as a child node to the SDIO controller that
-connects the device to the system.
-
-Required properties:
-
- - compatible : should be one of the following:
- * "marvell,sd8897"
- * "marvell,sd8997"
-
-Optional properties:
-
- - marvell,caldata* : A series of properties with marvell,caldata prefix,
- represent calibration data downloaded to the device during
- initialization. This is an array of unsigned 8-bit values.
- the properties should follow below property name and
- corresponding array length:
- "marvell,caldata-txpwrlimit-2g" (length = 566).
- "marvell,caldata-txpwrlimit-5g-sub0" (length = 502).
- "marvell,caldata-txpwrlimit-5g-sub1" (length = 688).
- "marvell,caldata-txpwrlimit-5g-sub2" (length = 750).
- "marvell,caldata-txpwrlimit-5g-sub3" (length = 502).
- - marvell,wakeup-pin : a wakeup pin number of wifi chip which will be configured
- to firmware. Firmware will wakeup the host using this pin
- during suspend/resume.
- - interrupt-parent: phandle of the parent interrupt controller
- - interrupts : interrupt pin number to the cpu. driver will request an irq based on
- this interrupt number. during system suspend, the irq will be enabled
- so that the wifi chip can wakeup host platform under certain condition.
- during system resume, the irq will be disabled to make sure
- unnecessary interrupt is not received.
-
-Example:
-
-Tx power limit calibration data is configured in below example.
-The calibration data is an array of unsigned values, the length
-can vary between hw versions.
-IRQ pin 38 is used as system wakeup source interrupt. wakeup pin 3 is configured
-so that firmware can wakeup host using this device side pin.
-
-&mmc3 {
- status = "okay";
- vmmc-supply = <&wlan_en_reg>;
- bus-width = <4>;
- cap-power-off-card;
- keep-power-in-suspend;
-
- #address-cells = <1>;
- #size-cells = <0>;
- mwifiex: wifi@1 {
- compatible = "marvell,sd8897";
- reg = <1>;
- interrupt-parent = <&pio>;
- interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
-
- marvell,caldata_00_txpwrlimit_2g_cfg_set = /bits/ 8 <
- 0x01 0x00 0x06 0x00 0x08 0x02 0x89 0x01>;
- marvell,wakeup-pin = <3>;
- };
-};
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index 3c3c4f1..be4d2b9 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -37,6 +37,22 @@ static struct mwifiex_if_ops pcie_ops;
static struct semaphore add_remove_card_sem;
+static const struct of_device_id mwifiex_pcie_of_match_table[] = {
+ { .compatible = "marvell,pcie8997" },
+ { }
+};
+
+static int mwifiex_pcie_probe_of(struct device *dev)
+{
+ if (!dev->of_node ||
+ !of_match_node(mwifiex_pcie_of_match_table, dev->of_node)) {
+ pr_err("pcie device node not available");
+ return -1;
+ }
+
+ return 0;
+}
+
static int
mwifiex_map_pci_memory(struct mwifiex_adapter *adapter, struct sk_buff *skb,
size_t size, int flags)
@@ -199,6 +215,9 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
card->pcie.can_ext_scan = data->can_ext_scan;
}
+ /* device tree node parsing and platform specific configuration*/
+ mwifiex_pcie_probe_of(&pdev->dev);
+
if (mwifiex_add_card(card, &add_remove_card_sem, &pcie_ops,
MWIFIEX_PCIE)) {
pr_err("%s failed\n", __func__);
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
index 2a162c3..c8dccf5 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
@@ -2218,7 +2218,8 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta, bool init)
* The cal-data can be read from device tree and/or
* a configuration file and downloaded to firmware.
*/
- if (priv->adapter->iface_type == MWIFIEX_SDIO &&
+ if ((priv->adapter->iface_type == MWIFIEX_SDIO ||
+ priv->adapter->iface_type == MWIFIEX_PCIE) &&
adapter->dev->of_node) {
adapter->dt_node = adapter->dev->of_node;
if (of_property_read_u32(adapter->dt_node,
--
1.9.1
^ permalink raw reply related
* Re: [PATCH 3/3] mwifiex: add custom regulatory domain support
From: Bob Copeland @ 2016-09-09 15:47 UTC (permalink / raw)
To: Amitkumar Karwar; +Cc: linux-wireless, Cathy Luo, Nishant Sarmukadam
In-Reply-To: <1470754246-635-3-git-send-email-akarwar@marvell.com>
On Tue, Aug 09, 2016 at 08:20:46PM +0530, Amitkumar Karwar wrote:
> This patch creates custom regulatory rules based on the information
> received from firmware and enable them during wiphy registration.
>
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Hi,
This patch recently landed in wireless-testing but I noticed (or well,
smatch noticed) some issues with the error paths:
> + if (adapter->regd) {
does null-check here and elsewhere...
> +static struct ieee80211_regdomain *
> +mwifiex_create_custom_regdomain(struct mwifiex_private *priv,
> + u8 *buf, u16 buf_len)
> +{
> + u16 num_chan = buf_len / 2;
> + struct ieee80211_regdomain *regd;
> + struct ieee80211_reg_rule *rule;
> + bool new_rule;
> + int regd_size, idx, freq, prev_freq = 0;
> + u32 bw, prev_bw = 0;
> + u8 chflags, prev_chflags = 0, valid_rules = 0;
> +
> + if (WARN_ON_ONCE(num_chan > NL80211_MAX_SUPP_REG_RULES))
> + return ERR_PTR(-EINVAL);
> +
...returns ERR_PTR here
> + regd_size = sizeof(struct ieee80211_regdomain) +
> + num_chan * sizeof(struct ieee80211_reg_rule);
> +
> + regd = kzalloc(regd_size, GFP_KERNEL);
> + if (!regd)
> + return ERR_PTR(-ENOMEM);
and here.
> +
> + for (idx = 0; idx < num_chan; idx++) {
> + u8 chan;
> + enum nl80211_band band;
> +
> + chan = *buf++;
> + if (!chan)
> + return NULL;
^ here, returns null, leaking regd
> + chflags = *buf++;
> + band = (chan <= 14) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
> + freq = ieee80211_channel_to_frequency(chan, band);
> + new_rule = false;
> +
> + if (chflags & MWIFIEX_CHANNEL_DISABLED)
> + continue;
> +
> + if (band == NL80211_BAND_5GHZ) {
> + if (!(chflags & MWIFIEX_CHANNEL_NOHT80))
> + bw = MHZ_TO_KHZ(80);
> + else if (!(chflags & MWIFIEX_CHANNEL_NOHT40))
> + bw = MHZ_TO_KHZ(40);
> + else
> + bw = MHZ_TO_KHZ(20);
> + } else {
> + if (!(chflags & MWIFIEX_CHANNEL_NOHT40))
> + bw = MHZ_TO_KHZ(40);
> + else
> + bw = MHZ_TO_KHZ(20);
> + }
> +
> + if (idx == 0 || prev_chflags != chflags || prev_bw != bw ||
> + freq - prev_freq > 20) {
> + valid_rules++;
> + new_rule = true;
> + }
> +
> + rule = ®d->reg_rules[valid_rules - 1];
> +
> + rule->freq_range.end_freq_khz = MHZ_TO_KHZ(freq + 10);
> +
> + prev_chflags = chflags;
> + prev_freq = freq;
> + prev_bw = bw;
> +
> + if (!new_rule)
> + continue;
> +
> + rule->freq_range.start_freq_khz = MHZ_TO_KHZ(freq - 10);
> + rule->power_rule.max_eirp = DBM_TO_MBM(19);
> +
> + if (chflags & MWIFIEX_CHANNEL_PASSIVE)
> + rule->flags = NL80211_RRF_NO_IR;
> +
> + if (chflags & MWIFIEX_CHANNEL_DFS)
> + rule->flags = NL80211_RRF_DFS;
> +
> + rule->freq_range.max_bandwidth_khz = bw;
> + }
> +
> + regd->n_reg_rules = valid_rules;
> + regd->alpha2[0] = '9';
> + regd->alpha2[1] = '9';
> +
> + return regd;
> +}
[...]
> static int mwifiex_ret_chan_region_cfg(struct mwifiex_private *priv,
> struct host_cmd_ds_command *resp)
> {
> @@ -1050,6 +1137,10 @@ static int mwifiex_ret_chan_region_cfg(struct mwifiex_private *priv,
> mwifiex_dbg_dump(priv->adapter, CMD_D, "CHAN:",
> (u8 *)head + sizeof(*head),
> tlv_buf_len);
> + priv->adapter->regd =
> + mwifiex_create_custom_regdomain(priv,
> + (u8 *)head +
> + sizeof(*head), tlv_buf_len);
Here regd is assigned without checking IS_ERR.
--
Bob Copeland %% http://bobcopeland.com/
^ permalink raw reply
* Re: [PATCH 1/3] ath10k: Ensure there are no stale ar->txqs entries.
From: Felix Fietkau @ 2016-09-09 17:25 UTC (permalink / raw)
To: greearb, ath10k; +Cc: linux-wireless
In-Reply-To: <1471569995-10028-1-git-send-email-greearb@candelatech.com>
On 2016-08-19 03:26, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
>
> I was seeing kernel crashes due to accessing freed memory
> while debugging a 9984 firmware that was crashing often.
>
> This patch fixes the crashes. I am not certain if there
> is a better way or not.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> drivers/net/wireless/ath/ath10k/mac.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
> index 5659ef1..916119c 100644
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -4172,8 +4172,10 @@ static void ath10k_mac_txq_init(struct ieee80211_txq *txq)
> static void ath10k_mac_txq_unref(struct ath10k *ar, struct ieee80211_txq *txq)
> {
> struct ath10k_txq *artxq = (void *)txq->drv_priv;
> + struct ath10k_txq *tmp, *walker;
> struct ath10k_skb_cb *cb;
> struct sk_buff *msdu;
> + struct ieee80211_txq *txq_tmp;
> int msdu_id;
>
> if (!txq)
> @@ -4182,6 +4184,14 @@ static void ath10k_mac_txq_unref(struct ath10k *ar, struct ieee80211_txq *txq)
> spin_lock_bh(&ar->txqs_lock);
> if (!list_empty(&artxq->list))
> list_del_init(&artxq->list);
> +
> + /* Remove from ar->txqs in case it still exists there. */
> + list_for_each_entry_safe(walker, tmp, &ar->txqs, list) {
> + txq_tmp = container_of((void *)walker, struct ieee80211_txq,
> + drv_priv);
> + if (txq_tmp == txq)
> + list_del(&walker->list);
> + }
This makes no sense at all. From txq_tmp == txq we can deduce that
walker == artxq. In the context above, it already does a
list_del_init(&artxq->list).
- Felix
^ permalink raw reply
* Re: [PATCH 1/3] ath10k: Ensure there are no stale ar->txqs entries.
From: Ben Greear @ 2016-09-09 17:46 UTC (permalink / raw)
To: Felix Fietkau, ath10k; +Cc: linux-wireless
In-Reply-To: <a9add01b-4d5a-0e1c-d856-64dcf71bdb1c@nbd.name>
On 09/09/2016 10:25 AM, Felix Fietkau wrote:
> On 2016-08-19 03:26, greearb@candelatech.com wrote:
>> From: Ben Greear <greearb@candelatech.com>
>>
>> I was seeing kernel crashes due to accessing freed memory
>> while debugging a 9984 firmware that was crashing often.
>>
>> This patch fixes the crashes. I am not certain if there
>> is a better way or not.
>>
>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>> ---
>> drivers/net/wireless/ath/ath10k/mac.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
>> index 5659ef1..916119c 100644
>> --- a/drivers/net/wireless/ath/ath10k/mac.c
>> +++ b/drivers/net/wireless/ath/ath10k/mac.c
>> @@ -4172,8 +4172,10 @@ static void ath10k_mac_txq_init(struct ieee80211_txq *txq)
>> static void ath10k_mac_txq_unref(struct ath10k *ar, struct ieee80211_txq *txq)
>> {
>> struct ath10k_txq *artxq = (void *)txq->drv_priv;
>> + struct ath10k_txq *tmp, *walker;
>> struct ath10k_skb_cb *cb;
>> struct sk_buff *msdu;
>> + struct ieee80211_txq *txq_tmp;
>> int msdu_id;
>>
>> if (!txq)
>> @@ -4182,6 +4184,14 @@ static void ath10k_mac_txq_unref(struct ath10k *ar, struct ieee80211_txq *txq)
>> spin_lock_bh(&ar->txqs_lock);
>> if (!list_empty(&artxq->list))
>> list_del_init(&artxq->list);
>> +
>> + /* Remove from ar->txqs in case it still exists there. */
>> + list_for_each_entry_safe(walker, tmp, &ar->txqs, list) {
>> + txq_tmp = container_of((void *)walker, struct ieee80211_txq,
>> + drv_priv);
>> + if (txq_tmp == txq)
>> + list_del(&walker->list);
>> + }
> This makes no sense at all. From txq_tmp == txq we can deduce that
> walker == artxq. In the context above, it already does a
> list_del_init(&artxq->list).
This fixed my problem, so something about this matters.
Possibly it works around some other race, just possibly it
is because of some other regression/bug in my driver/kernel.
I thought maybe the issue was that flushing doesn't really work
for ath10k, so when the upper stack tried to flush and delete
a station there were still skbs in the driver that were referencing
the txqs up in mac80211.
Also, this bug was triggered by firmware that crashed very often on
transmit of an skb, so in general there were skbs that were not properly
transmitted and maybe that also triggers some other bug/race in the
driver.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* [PATCH 0/2] Fix spelling and reset device on module unload
From: Jes.Sorensen @ 2016-09-09 18:01 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Jes Sorensen
From: Jes Sorensen <Jes.Sorensen@redhat.com>
Hi,
Two fixes for the rtl8xxxu driver.
I am working on a much larger set which adds 8188eu support, and while
it's close to there, I am still chasing one issue where it doesn't
come back if reloading the driver module.
In the interim, these two should be good to apply.
Cheers,
Jes
Colin Ian King (1):
rtl8xxxu: fix spelling mistake "firmare" -> "firmware"
Jes Sorensen (1):
rtl8xxxu: Reset device on module unload if still attached
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--
2.7.4
^ permalink raw reply
* [PATCH 2/2] rtl8xxxu: fix spelling mistake "firmare" -> "firmware"
From: Jes.Sorensen @ 2016-09-09 18:01 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Colin Ian King, Jes Sorensen
In-Reply-To: <1473444085-6363-1-git-send-email-Jes.Sorensen@redhat.com>
From: Colin Ian King <colin.king@canonical.com>
Trivial fix to spelling mistakes in dev_dbg message.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index d2611a4..ca92022 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -3921,11 +3921,11 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
rtl8xxxu_write16(priv, REG_TRXFF_BNDY + 2, priv->fops->trxff_boundary);
ret = rtl8xxxu_download_firmware(priv);
- dev_dbg(dev, "%s: download_fiwmare %i\n", __func__, ret);
+ dev_dbg(dev, "%s: download_firmware %i\n", __func__, ret);
if (ret)
goto exit;
ret = rtl8xxxu_start_firmware(priv);
- dev_dbg(dev, "%s: start_fiwmare %i\n", __func__, ret);
+ dev_dbg(dev, "%s: start_firmware %i\n", __func__, ret);
if (ret)
goto exit;
--
2.7.4
^ permalink raw reply related
* [PATCH 1/2] rtl8xxxu: Reset device on module unload if still attached
From: Jes.Sorensen @ 2016-09-09 18:01 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Jes Sorensen
In-Reply-To: <1473444085-6363-1-git-send-email-Jes.Sorensen@redhat.com>
From: Jes Sorensen <Jes.Sorensen@redhat.com>
If the USB dongle is still attached, reset it on module unload to
avoid scans failing when reloading the driver.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index c362083..d2611a4 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -6129,6 +6129,11 @@ static void rtl8xxxu_disconnect(struct usb_interface *interface)
mutex_destroy(&priv->usb_buf_mutex);
mutex_destroy(&priv->h2c_mutex);
+ if (priv->udev->state != USB_STATE_NOTATTACHED) {
+ dev_info(&priv->udev->dev,
+ "Device still attached, trying to reset\n");
+ usb_reset_device(priv->udev);
+ }
usb_put_dev(priv->udev);
ieee80211_free_hw(hw);
}
--
2.7.4
^ permalink raw reply related
* Re: support for QCA9377 SDIO (ath10k or ath6kl)
From: Martin Blumenstingl @ 2016-09-09 20:01 UTC (permalink / raw)
To: Valo, Kalle
Cc: ath10k@lists.infradead.org, ath6kl@lists.infradead.org,
linux-wireless@vger.kernel.org
In-Reply-To: <87wpilp7x0.fsf@kamboji.qca.qualcomm.com>
On Fri, Sep 9, 2016 at 2:35 PM, Valo, Kalle <kvalo@qca.qualcomm.com> wrote:
>> is there any support for the SDIO chips QCA9377 (and QCA9378) planned?
>> Would these be supported by ath10k or ath6kl or is a completely new
>> driver needed?
>
> I'm not familiar with the details of QCA9377 SDIO firmware but I assume
> ath10k would be the best option for supporting it. We split from the
> beginning the core code (ath10k_core.ko) and the PCI code
> (ath10k_pci.ko) to make it easier to add new bus support.
ath10k also gained AHB support some months ago, so it seems to allow
for multiple bus types.
however, that is only relevant if the QCA9377 SDIO firmware uses the
same interface as supported by ath10k -> could we get a statement from
the firmware team about this?
is QCA planning to add SDIO support to ath10k or would this have to be
done by a community developer?
Regards,
Martin
^ permalink raw reply
* Re: [PATCH v6 1/3] Documentation: dt: net: add ath9k wireless device binding
From: Martin Blumenstingl @ 2016-09-09 20:57 UTC (permalink / raw)
To: Oleksij Rempel
Cc: ath9k-devel, devicetree, linux-wireless, ath9k-devel, mcgrof,
mark.rutland, robh+dt, kvalo, chunkeey, arend.vanspriel,
julian.calaby, bjorn, nbd, arnd
In-Reply-To: <3b93ec95-ec7c-863a-06b7-fab4f2688855@rempel-privat.de>
On Fri, Sep 9, 2016 at 9:48 AM, Oleksij Rempel <linux@rempel-privat.de> wrote:
>> +Optional properties:
>> +- reg: Address and length of the register set for the device.
>> +- qca,clk-25mhz: Defines that a 25MHz clock is used
>
> Some SoCs even Atheros WiSoCs use WiFi clock for System Clock. In this
> case we need to use clock framework any way, so why not in this case too?
> Provide dummy static clock in DT and connect it with this node?
>
> osc25m: oscillator {
> compatible = "fixed-clock";
> #clock-cells = <0>;
> clock-frequency = <25000000>;
> clock-accuracy = <30000>;
> };
>
> acc: clock-controller@80040000 {
> compatible = "some-clock-controller";
> #clock-cells = <1>;
> clocks = <&osc25m>;
> reg = <0x80040000 0x204>;
> };
>
>
> &pci0 {
> ath9k@168c,002d {
> compatible = "pci168c,002d";
> reg = <0x7000 0 0 0 0x1000>;
> clocks = <&osc25m>;
> qca,disable-5ghz;
> };
> };
>
>
> driver will need to use clk_get and compare frequency instead of
> of_property_read_bool(np, "qca,clk-25mhz"). In this case you will need
> to define source clock only one time and reuse it by all affected DT
> nodes. If we have 40MHz clock you will only need to change it in
> fixed-clock.
that does sound like a good idea, thanks for that input!
However, I will remove the property for the first version because I am
trying to get PCI(e) devices supported. OF support for AHB (WiSoC)
needs more work (in other places, like ahb.c) anyways.
But this suggestion should be remembered!
>> +- qca,no-eeprom: Indicates that there is no physical EEPROM connected to the
>> + ath9k wireless chip (in this case the calibration /
>> + EEPROM data will be loaded from userspace using the
>> + kernel firmware loader).
>> +- qca,disable-2ghz: Overrides the settings from the EEPROM and disables the
>> + 2.4GHz band. Setting this property is only needed
>> + when the RF circuit does not support the 2.4GHz band
>> + while it is enabled nevertheless in the EEPROM.
>> +- qca,disable-5ghz: Overrides the settings from the EEPROM and disables the
>> + 5GHz band. Setting this property is only needed when
>> + the RF circuit does not support the 5GHz band while
>> + it is enabled nevertheless in the EEPROM.
>
> This option can be reused for every WiFi controller. Not only for qca.
> So may be instead of adding vendor specific name, make it reusable for
> all vendors. Instead of qca,disable-5ghz and qca,disable-2ghz make
> disable-5ghz and disable-2ghz?
I am personally fine with anything that fits best into the grand
scheme of things.
There are three scenarios I can think of which may be influenced by
devicetree configuration:
a) let the driver decide automatically whether the 2.4GHz and/or 5GHz
band is/are enabled
b) explicitly disable either bands (because the driver thinks due to
whatever reason that a band is supported while in reality it isn't)
c) explicitly enable a band (for example because the driver cannot
automagically detect which band should be enabled)
for ath9k we default to a) but also allow b): the EEPROM (device
specific calibration data) contains information about which bands are
enabled (or not). But some manufacturers are shipping devices for
example with the 5G band enabled, while the actual hardware doesn't
support it.
Felix' mt76 driver for example defaults to case a) but allows
overriding (= forcefully enabling or disabling) a specific band.
If we decide how this should look like in the devicetree then I can go
ahead and implement it accordingly.
Regards,
Martin
[0] https://github.com/openwrt/mt76/blob/master/eeprom.c#L79
^ permalink raw reply
* Re: pull-request: wireless-drivers 2016-09-08
From: David Miller @ 2016-09-10 2:21 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <8737latyoj.fsf@kamboji.qca.qualcomm.com>
From: Kalle Valo <kvalo@codeaurora.org>
Date: Thu, 08 Sep 2016 14:31:56 +0300
> The following changes since commit bb87f02b7e4ccdb614a83cbf840524de81e9b321:
>
> Merge ath-current from ath.git (2016-08-29 21:39:04 +0300)
>
> are available in the git repository at:
>
>
> git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git tags/wireless-drivers-for-davem-2016-09-08
Pulled, thanks Kalle.
^ permalink raw reply
* [PATCH - FYI - do not apply] staging: Remove rtl8723au driver
From: Jes.Sorensen @ 2016-09-10 12:25 UTC (permalink / raw)
To: gregkh; +Cc: devel, Larry.Finger, linux-wireless, Jes Sorensen
From: Jes Sorensen <Jes.Sorensen@redhat.com>
Hi,
I sent Greg the full version of this patch, removing the old rtl8723au
driver. I didn't want to spam the list with a 2M+ patch so this is the
summary version.
Cheers,
Jes
This driver is superseded by rtl8xxxu and has been marked as scheduled
for deletion since 4.6
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
MAINTAINERS | 7 -
drivers/staging/Kconfig | 2 -
drivers/staging/Makefile | 1 -
drivers/staging/rtl8723au/Kconfig | 33 -
drivers/staging/rtl8723au/Makefile | 53 -
drivers/staging/rtl8723au/TODO | 16 -
drivers/staging/rtl8723au/core/rtw_ap.c | 1738 ---
drivers/staging/rtl8723au/core/rtw_cmd.c | 1470 ---
drivers/staging/rtl8723au/core/rtw_efuse.c | 538 -
drivers/staging/rtl8723au/core/rtw_ieee80211.c | 855 --
drivers/staging/rtl8723au/core/rtw_mlme.c | 2314 ----
drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 6187 ----------
drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 607 -
drivers/staging/rtl8723au/core/rtw_recv.c | 2204 ----
drivers/staging/rtl8723au/core/rtw_security.c | 1630 ---
drivers/staging/rtl8723au/core/rtw_sreset.c | 214 -
drivers/staging/rtl8723au/core/rtw_sta_mgt.c | 439 -
drivers/staging/rtl8723au/core/rtw_wlan_util.c | 1537 ---
drivers/staging/rtl8723au/core/rtw_xmit.c | 2337 ----
drivers/staging/rtl8723au/hal/Hal8723PwrSeq.c | 80 -
drivers/staging/rtl8723au/hal/Hal8723UHWImg_CE.c | 136 -
.../staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c | 1097 --
drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c | 565 -
drivers/staging/rtl8723au/hal/HalHWImg8723A_MAC.c | 187 -
drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c | 259 -
drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c | 156 -
drivers/staging/rtl8723au/hal/hal_com.c | 853 --
drivers/staging/rtl8723au/hal/hal_intf.c | 42 -
drivers/staging/rtl8723au/hal/odm.c | 1732 ---
drivers/staging/rtl8723au/hal/odm_HWConfig.c | 396 -
drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c | 88 -
drivers/staging/rtl8723au/hal/odm_debug.c | 39 -
drivers/staging/rtl8723au/hal/odm_interface.c | 49 -
.../staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 11265 -------------------
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c | 755 --
drivers/staging/rtl8723au/hal/rtl8723a_dm.c | 194 -
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2076 ----
drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c | 961 --
drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c | 503 -
drivers/staging/rtl8723au/hal/rtl8723a_rxdesc.c | 69 -
drivers/staging/rtl8723au/hal/rtl8723a_sreset.c | 55 -
drivers/staging/rtl8723au/hal/rtl8723au_recv.c | 267 -
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c | 520 -
drivers/staging/rtl8723au/hal/usb_halinit.c | 1269 ---
drivers/staging/rtl8723au/hal/usb_ops_linux.c | 690 --
drivers/staging/rtl8723au/include/Hal8723APhyCfg.h | 162 -
drivers/staging/rtl8723au/include/Hal8723APhyReg.h | 1078 --
drivers/staging/rtl8723au/include/Hal8723PwrSeq.h | 126 -
.../staging/rtl8723au/include/Hal8723UHWImg_CE.h | 29 -
.../staging/rtl8723au/include/HalDMOutSrc8723A.h | 64 -
.../staging/rtl8723au/include/HalHWImg8723A_BB.h | 38 -
.../staging/rtl8723au/include/HalHWImg8723A_FW.h | 28 -
.../staging/rtl8723au/include/HalHWImg8723A_MAC.h | 26 -
.../staging/rtl8723au/include/HalHWImg8723A_RF.h | 25 -
drivers/staging/rtl8723au/include/HalPwrSeqCmd.h | 130 -
drivers/staging/rtl8723au/include/HalVerDef.h | 114 -
drivers/staging/rtl8723au/include/drv_types.h | 274 -
drivers/staging/rtl8723au/include/hal_com.h | 182 -
drivers/staging/rtl8723au/include/hal_intf.h | 115 -
drivers/staging/rtl8723au/include/ieee80211.h | 341 -
drivers/staging/rtl8723au/include/ioctl_cfg80211.h | 66 -
drivers/staging/rtl8723au/include/mlme_osdep.h | 24 -
drivers/staging/rtl8723au/include/odm.h | 860 --
drivers/staging/rtl8723au/include/odm_HWConfig.h | 153 -
.../staging/rtl8723au/include/odm_RegConfig8723A.h | 27 -
.../staging/rtl8723au/include/odm_RegDefine11N.h | 165 -
drivers/staging/rtl8723au/include/odm_debug.h | 117 -
drivers/staging/rtl8723au/include/odm_interface.h | 62 -
drivers/staging/rtl8723au/include/odm_precomp.h | 49 -
drivers/staging/rtl8723au/include/odm_reg.h | 111 -
drivers/staging/rtl8723au/include/osdep_intf.h | 45 -
drivers/staging/rtl8723au/include/osdep_service.h | 87 -
drivers/staging/rtl8723au/include/recv_osdep.h | 36 -
.../rtl8723au/include/rtl8723a_bt-coexist.h | 1627 ---
.../staging/rtl8723au/include/rtl8723a_bt_intf.h | 69 -
drivers/staging/rtl8723au/include/rtl8723a_cmd.h | 158 -
drivers/staging/rtl8723au/include/rtl8723a_dm.h | 137 -
drivers/staging/rtl8723au/include/rtl8723a_hal.h | 538 -
drivers/staging/rtl8723au/include/rtl8723a_pg.h | 98 -
drivers/staging/rtl8723au/include/rtl8723a_recv.h | 65 -
drivers/staging/rtl8723au/include/rtl8723a_rf.h | 58 -
drivers/staging/rtl8723au/include/rtl8723a_spec.h | 2148 ----
.../staging/rtl8723au/include/rtl8723a_sreset.h | 24 -
drivers/staging/rtl8723au/include/rtl8723a_xmit.h | 225 -
drivers/staging/rtl8723au/include/rtw_ap.h | 51 -
drivers/staging/rtl8723au/include/rtw_cmd.h | 815 --
drivers/staging/rtl8723au/include/rtw_debug.h | 191 -
drivers/staging/rtl8723au/include/rtw_eeprom.h | 135 -
drivers/staging/rtl8723au/include/rtw_efuse.h | 109 -
drivers/staging/rtl8723au/include/rtw_event.h | 74 -
drivers/staging/rtl8723au/include/rtw_ht.h | 42 -
drivers/staging/rtl8723au/include/rtw_io.h | 235 -
drivers/staging/rtl8723au/include/rtw_mlme.h | 340 -
drivers/staging/rtl8723au/include/rtw_mlme_ext.h | 683 --
drivers/staging/rtl8723au/include/rtw_pwrctrl.h | 242 -
drivers/staging/rtl8723au/include/rtw_recv.h | 305 -
drivers/staging/rtl8723au/include/rtw_rf.h | 102 -
drivers/staging/rtl8723au/include/rtw_security.h | 331 -
drivers/staging/rtl8723au/include/rtw_sreset.h | 36 -
drivers/staging/rtl8723au/include/rtw_version.h | 1 -
drivers/staging/rtl8723au/include/rtw_xmit.h | 380 -
drivers/staging/rtl8723au/include/sta_info.h | 373 -
drivers/staging/rtl8723au/include/usb_ops.h | 68 -
drivers/staging/rtl8723au/include/usb_ops_linux.h | 41 -
drivers/staging/rtl8723au/include/wifi.h | 84 -
drivers/staging/rtl8723au/include/wlan_bssdef.h | 123 -
drivers/staging/rtl8723au/include/xmit_osdep.h | 38 -
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 3348 ------
drivers/staging/rtl8723au/os_dep/mlme_linux.c | 81 -
drivers/staging/rtl8723au/os_dep/os_intfs.c | 852 --
drivers/staging/rtl8723au/os_dep/recv_linux.c | 165 -
drivers/staging/rtl8723au/os_dep/usb_intf.c | 628 --
drivers/staging/rtl8723au/os_dep/usb_ops_linux.c | 233 -
drivers/staging/rtl8723au/os_dep/xmit_linux.c | 154 -
114 files changed, 66426 deletions(-)
delete mode 100644 drivers/staging/rtl8723au/Kconfig
delete mode 100644 drivers/staging/rtl8723au/Makefile
delete mode 100644 drivers/staging/rtl8723au/TODO
delete mode 100644 drivers/staging/rtl8723au/core/rtw_ap.c
delete mode 100644 drivers/staging/rtl8723au/core/rtw_cmd.c
delete mode 100644 drivers/staging/rtl8723au/core/rtw_efuse.c
delete mode 100644 drivers/staging/rtl8723au/core/rtw_ieee80211.c
delete mode 100644 drivers/staging/rtl8723au/core/rtw_mlme.c
delete mode 100644 drivers/staging/rtl8723au/core/rtw_mlme_ext.c
delete mode 100644 drivers/staging/rtl8723au/core/rtw_pwrctrl.c
delete mode 100644 drivers/staging/rtl8723au/core/rtw_recv.c
delete mode 100644 drivers/staging/rtl8723au/core/rtw_security.c
delete mode 100644 drivers/staging/rtl8723au/core/rtw_sreset.c
delete mode 100644 drivers/staging/rtl8723au/core/rtw_sta_mgt.c
delete mode 100644 drivers/staging/rtl8723au/core/rtw_wlan_util.c
delete mode 100644 drivers/staging/rtl8723au/core/rtw_xmit.c
delete mode 100644 drivers/staging/rtl8723au/hal/Hal8723PwrSeq.c
delete mode 100644 drivers/staging/rtl8723au/hal/Hal8723UHWImg_CE.c
delete mode 100644 drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c
delete mode 100644 drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c
delete mode 100644 drivers/staging/rtl8723au/hal/HalHWImg8723A_MAC.c
delete mode 100644 drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c
delete mode 100644 drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c
delete mode 100644 drivers/staging/rtl8723au/hal/hal_com.c
delete mode 100644 drivers/staging/rtl8723au/hal/hal_intf.c
delete mode 100644 drivers/staging/rtl8723au/hal/odm.c
delete mode 100644 drivers/staging/rtl8723au/hal/odm_HWConfig.c
delete mode 100644 drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
delete mode 100644 drivers/staging/rtl8723au/hal/odm_debug.c
delete mode 100644 drivers/staging/rtl8723au/hal/odm_interface.c
delete mode 100644 drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
delete mode 100644 drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
delete mode 100644 drivers/staging/rtl8723au/hal/rtl8723a_dm.c
delete mode 100644 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
delete mode 100644 drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
delete mode 100644 drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
delete mode 100644 drivers/staging/rtl8723au/hal/rtl8723a_rxdesc.c
delete mode 100644 drivers/staging/rtl8723au/hal/rtl8723a_sreset.c
delete mode 100644 drivers/staging/rtl8723au/hal/rtl8723au_recv.c
delete mode 100644 drivers/staging/rtl8723au/hal/rtl8723au_xmit.c
delete mode 100644 drivers/staging/rtl8723au/hal/usb_halinit.c
delete mode 100644 drivers/staging/rtl8723au/hal/usb_ops_linux.c
delete mode 100644 drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
delete mode 100644 drivers/staging/rtl8723au/include/Hal8723APhyReg.h
delete mode 100644 drivers/staging/rtl8723au/include/Hal8723PwrSeq.h
delete mode 100644 drivers/staging/rtl8723au/include/Hal8723UHWImg_CE.h
delete mode 100644 drivers/staging/rtl8723au/include/HalDMOutSrc8723A.h
delete mode 100644 drivers/staging/rtl8723au/include/HalHWImg8723A_BB.h
delete mode 100644 drivers/staging/rtl8723au/include/HalHWImg8723A_FW.h
delete mode 100644 drivers/staging/rtl8723au/include/HalHWImg8723A_MAC.h
delete mode 100644 drivers/staging/rtl8723au/include/HalHWImg8723A_RF.h
delete mode 100644 drivers/staging/rtl8723au/include/HalPwrSeqCmd.h
delete mode 100644 drivers/staging/rtl8723au/include/HalVerDef.h
delete mode 100644 drivers/staging/rtl8723au/include/drv_types.h
delete mode 100644 drivers/staging/rtl8723au/include/hal_com.h
delete mode 100644 drivers/staging/rtl8723au/include/hal_intf.h
delete mode 100644 drivers/staging/rtl8723au/include/ieee80211.h
delete mode 100644 drivers/staging/rtl8723au/include/ioctl_cfg80211.h
delete mode 100644 drivers/staging/rtl8723au/include/mlme_osdep.h
delete mode 100644 drivers/staging/rtl8723au/include/odm.h
delete mode 100644 drivers/staging/rtl8723au/include/odm_HWConfig.h
delete mode 100644 drivers/staging/rtl8723au/include/odm_RegConfig8723A.h
delete mode 100644 drivers/staging/rtl8723au/include/odm_RegDefine11N.h
delete mode 100644 drivers/staging/rtl8723au/include/odm_debug.h
delete mode 100644 drivers/staging/rtl8723au/include/odm_interface.h
delete mode 100644 drivers/staging/rtl8723au/include/odm_precomp.h
delete mode 100644 drivers/staging/rtl8723au/include/odm_reg.h
delete mode 100644 drivers/staging/rtl8723au/include/osdep_intf.h
delete mode 100644 drivers/staging/rtl8723au/include/osdep_service.h
delete mode 100644 drivers/staging/rtl8723au/include/recv_osdep.h
delete mode 100644 drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h
delete mode 100644 drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h
delete mode 100644 drivers/staging/rtl8723au/include/rtl8723a_cmd.h
delete mode 100644 drivers/staging/rtl8723au/include/rtl8723a_dm.h
delete mode 100644 drivers/staging/rtl8723au/include/rtl8723a_hal.h
delete mode 100644 drivers/staging/rtl8723au/include/rtl8723a_pg.h
delete mode 100644 drivers/staging/rtl8723au/include/rtl8723a_recv.h
delete mode 100644 drivers/staging/rtl8723au/include/rtl8723a_rf.h
delete mode 100644 drivers/staging/rtl8723au/include/rtl8723a_spec.h
delete mode 100644 drivers/staging/rtl8723au/include/rtl8723a_sreset.h
delete mode 100644 drivers/staging/rtl8723au/include/rtl8723a_xmit.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_ap.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_cmd.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_debug.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_eeprom.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_efuse.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_event.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_ht.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_io.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_mlme.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_mlme_ext.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_pwrctrl.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_recv.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_rf.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_security.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_sreset.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_version.h
delete mode 100644 drivers/staging/rtl8723au/include/rtw_xmit.h
delete mode 100644 drivers/staging/rtl8723au/include/sta_info.h
delete mode 100644 drivers/staging/rtl8723au/include/usb_ops.h
delete mode 100644 drivers/staging/rtl8723au/include/usb_ops_linux.h
delete mode 100644 drivers/staging/rtl8723au/include/wifi.h
delete mode 100644 drivers/staging/rtl8723au/include/wlan_bssdef.h
delete mode 100644 drivers/staging/rtl8723au/include/xmit_osdep.h
delete mode 100644 drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
delete mode 100644 drivers/staging/rtl8723au/os_dep/mlme_linux.c
delete mode 100644 drivers/staging/rtl8723au/os_dep/os_intfs.c
delete mode 100644 drivers/staging/rtl8723au/os_dep/recv_linux.c
delete mode 100644 drivers/staging/rtl8723au/os_dep/usb_intf.c
delete mode 100644 drivers/staging/rtl8723au/os_dep/usb_ops_linux.c
delete mode 100644 drivers/staging/rtl8723au/os_dep/xmit_linux.c
diff --git a/MAINTAINERS b/MAINTAINERS
index b53c828..0c554b5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11210,13 +11210,6 @@ M: Florian Schilhabel <florian.c.schilhabel@googlemail.com>.
S: Odd Fixes
F: drivers/staging/rtl8712/
-STAGING - REALTEK RTL8723U WIRELESS DRIVER
-M: Larry Finger <Larry.Finger@lwfinger.net>
-M: Jes Sorensen <Jes.Sorensen@redhat.com>
-L: linux-wireless@vger.kernel.org
-S: Maintained
-F: drivers/staging/rtl8723au/
-
STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER
M: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
M: Teddy Wang <teddy.wang@siliconmotion.com>
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index af94764..5ebaf00 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -40,8 +40,6 @@ source "drivers/staging/rtl8712/Kconfig"
source "drivers/staging/rtl8188eu/Kconfig"
-source "drivers/staging/rtl8723au/Kconfig"
-
source "drivers/staging/rts5208/Kconfig"
source "drivers/staging/octeon/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 9f6009d..29a1672 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -9,7 +9,6 @@ obj-$(CONFIG_RTL8192U) += rtl8192u/
obj-$(CONFIG_RTL8192E) += rtl8192e/
obj-$(CONFIG_R8712U) += rtl8712/
obj-$(CONFIG_R8188EU) += rtl8188eu/
-obj-$(CONFIG_R8723AU) += rtl8723au/
obj-$(CONFIG_RTS5208) += rts5208/
obj-$(CONFIG_NETLOGIC_XLR_NET) += netlogic/
obj-$(CONFIG_OCTEON_ETHERNET) += octeon/
diff --git a/drivers/staging/rtl8723au/Kconfig b/drivers/staging/rtl8723au/Kconfig
deleted file mode 100644
index 277c1ab..0000000
diff --git a/drivers/staging/rtl8723au/Makefile b/drivers/staging/rtl8723au/Makefile
deleted file mode 100644
index 3e89890..0000000
diff --git a/drivers/staging/rtl8723au/TODO b/drivers/staging/rtl8723au/TODO
deleted file mode 100644
index 42b86e4..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
deleted file mode 100644
index aad686d..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c
deleted file mode 100644
index cd4e0f0..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_efuse.c b/drivers/staging/rtl8723au/core/rtw_efuse.c
deleted file mode 100644
index 359ef41..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_ieee80211.c b/drivers/staging/rtl8723au/core/rtw_ieee80211.c
deleted file mode 100644
index 9fa0ef1..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c
deleted file mode 100644
index a786fc4..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
deleted file mode 100644
index 7dd1540..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c
deleted file mode 100644
index 2d43958..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c b/drivers/staging/rtl8723au/core/rtw_recv.c
deleted file mode 100644
index 150dabc..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_security.c b/drivers/staging/rtl8723au/core/rtw_security.c
deleted file mode 100644
index 5a4cfdf..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_sreset.c b/drivers/staging/rtl8723au/core/rtw_sreset.c
deleted file mode 100644
index 29a29d9..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c
deleted file mode 100644
index a9b778c..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c b/drivers/staging/rtl8723au/core/rtw_wlan_util.c
deleted file mode 100644
index 694cf17..0000000
diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c b/drivers/staging/rtl8723au/core/rtw_xmit.c
deleted file mode 100644
index 003576d..0000000
diff --git a/drivers/staging/rtl8723au/hal/Hal8723PwrSeq.c b/drivers/staging/rtl8723au/hal/Hal8723PwrSeq.c
deleted file mode 100644
index 747f86c..0000000
diff --git a/drivers/staging/rtl8723au/hal/Hal8723UHWImg_CE.c b/drivers/staging/rtl8723au/hal/Hal8723UHWImg_CE.c
deleted file mode 100644
index 56833da..0000000
diff --git a/drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c b/drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c
deleted file mode 100644
index 3f9ec9e0..0000000
diff --git a/drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c b/drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c
deleted file mode 100644
index 8d3ea6c..0000000
diff --git a/drivers/staging/rtl8723au/hal/HalHWImg8723A_MAC.c b/drivers/staging/rtl8723au/hal/HalHWImg8723A_MAC.c
deleted file mode 100644
index 9bf6859..0000000
diff --git a/drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c b/drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c
deleted file mode 100644
index 286f3ea..0000000
diff --git a/drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c b/drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c
deleted file mode 100644
index 0a3d96e..0000000
diff --git a/drivers/staging/rtl8723au/hal/hal_com.c b/drivers/staging/rtl8723au/hal/hal_com.c
deleted file mode 100644
index 9d7b11b..0000000
diff --git a/drivers/staging/rtl8723au/hal/hal_intf.c b/drivers/staging/rtl8723au/hal/hal_intf.c
deleted file mode 100644
index 5383e69..0000000
diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c
deleted file mode 100644
index e279c34..0000000
diff --git a/drivers/staging/rtl8723au/hal/odm_HWConfig.c b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
deleted file mode 100644
index 0562f61..0000000
diff --git a/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c b/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
deleted file mode 100644
index a63c6cb..0000000
diff --git a/drivers/staging/rtl8723au/hal/odm_debug.c b/drivers/staging/rtl8723au/hal/odm_debug.c
deleted file mode 100644
index cb2bdda..0000000
diff --git a/drivers/staging/rtl8723au/hal/odm_interface.c b/drivers/staging/rtl8723au/hal/odm_interface.c
deleted file mode 100644
index d8f6790..0000000
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
deleted file mode 100644
index 47e8d69..0000000
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
deleted file mode 100644
index 2230f4c..0000000
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_dm.c b/drivers/staging/rtl8723au/hal/rtl8723a_dm.c
deleted file mode 100644
index 1e831f2..0000000
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
deleted file mode 100644
index 1ea0af4..0000000
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
deleted file mode 100644
index 06a6c3e..0000000
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
deleted file mode 100644
index 24c0ff3..0000000
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_rxdesc.c b/drivers/staging/rtl8723au/hal/rtl8723a_rxdesc.c
deleted file mode 100644
index 81b5efe..0000000
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_sreset.c b/drivers/staging/rtl8723au/hal/rtl8723a_sreset.c
deleted file mode 100644
index 3c46294..0000000
diff --git a/drivers/staging/rtl8723au/hal/rtl8723au_recv.c b/drivers/staging/rtl8723au/hal/rtl8723au_recv.c
deleted file mode 100644
index 0fec84b..0000000
diff --git a/drivers/staging/rtl8723au/hal/rtl8723au_xmit.c b/drivers/staging/rtl8723au/hal/rtl8723au_xmit.c
deleted file mode 100644
index 14746dd..0000000
diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c
deleted file mode 100644
index fa47aeb..0000000
diff --git a/drivers/staging/rtl8723au/hal/usb_ops_linux.c b/drivers/staging/rtl8723au/hal/usb_ops_linux.c
deleted file mode 100644
index 5c81ff4..0000000
diff --git a/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h b/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
deleted file mode 100644
index bcf3657..0000000
diff --git a/drivers/staging/rtl8723au/include/Hal8723APhyReg.h b/drivers/staging/rtl8723au/include/Hal8723APhyReg.h
deleted file mode 100644
index 759928f..0000000
diff --git a/drivers/staging/rtl8723au/include/Hal8723PwrSeq.h b/drivers/staging/rtl8723au/include/Hal8723PwrSeq.h
deleted file mode 100644
index 3771d6b..0000000
diff --git a/drivers/staging/rtl8723au/include/Hal8723UHWImg_CE.h b/drivers/staging/rtl8723au/include/Hal8723UHWImg_CE.h
deleted file mode 100644
index c834b3a..0000000
diff --git a/drivers/staging/rtl8723au/include/HalDMOutSrc8723A.h b/drivers/staging/rtl8723au/include/HalDMOutSrc8723A.h
deleted file mode 100644
index d7651f7..0000000
diff --git a/drivers/staging/rtl8723au/include/HalHWImg8723A_BB.h b/drivers/staging/rtl8723au/include/HalHWImg8723A_BB.h
deleted file mode 100644
index 1276094..0000000
diff --git a/drivers/staging/rtl8723au/include/HalHWImg8723A_FW.h b/drivers/staging/rtl8723au/include/HalHWImg8723A_FW.h
deleted file mode 100644
index 7ee363b..0000000
diff --git a/drivers/staging/rtl8723au/include/HalHWImg8723A_MAC.h b/drivers/staging/rtl8723au/include/HalHWImg8723A_MAC.h
deleted file mode 100644
index 201be1f..0000000
diff --git a/drivers/staging/rtl8723au/include/HalHWImg8723A_RF.h b/drivers/staging/rtl8723au/include/HalHWImg8723A_RF.h
deleted file mode 100644
index c9af1c3..0000000
diff --git a/drivers/staging/rtl8723au/include/HalPwrSeqCmd.h b/drivers/staging/rtl8723au/include/HalPwrSeqCmd.h
deleted file mode 100644
index 12e03a3..0000000
diff --git a/drivers/staging/rtl8723au/include/HalVerDef.h b/drivers/staging/rtl8723au/include/HalVerDef.h
deleted file mode 100644
index 2a0e4ea..0000000
diff --git a/drivers/staging/rtl8723au/include/drv_types.h b/drivers/staging/rtl8723au/include/drv_types.h
deleted file mode 100644
index e83463a..0000000
diff --git a/drivers/staging/rtl8723au/include/hal_com.h b/drivers/staging/rtl8723au/include/hal_com.h
deleted file mode 100644
index 9c50320..0000000
diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h
deleted file mode 100644
index b924d47..0000000
diff --git a/drivers/staging/rtl8723au/include/ieee80211.h b/drivers/staging/rtl8723au/include/ieee80211.h
deleted file mode 100644
index 634102e..0000000
diff --git a/drivers/staging/rtl8723au/include/ioctl_cfg80211.h b/drivers/staging/rtl8723au/include/ioctl_cfg80211.h
deleted file mode 100644
index 3a4ead5..0000000
diff --git a/drivers/staging/rtl8723au/include/mlme_osdep.h b/drivers/staging/rtl8723au/include/mlme_osdep.h
deleted file mode 100644
index 4bb5525..0000000
diff --git a/drivers/staging/rtl8723au/include/odm.h b/drivers/staging/rtl8723au/include/odm.h
deleted file mode 100644
index 24f2f28..0000000
diff --git a/drivers/staging/rtl8723au/include/odm_HWConfig.h b/drivers/staging/rtl8723au/include/odm_HWConfig.h
deleted file mode 100644
index c748d5f..0000000
diff --git a/drivers/staging/rtl8723au/include/odm_RegConfig8723A.h b/drivers/staging/rtl8723au/include/odm_RegConfig8723A.h
deleted file mode 100644
index f2a54d8..0000000
diff --git a/drivers/staging/rtl8723au/include/odm_RegDefine11N.h b/drivers/staging/rtl8723au/include/odm_RegDefine11N.h
deleted file mode 100644
index 2778215..0000000
diff --git a/drivers/staging/rtl8723au/include/odm_debug.h b/drivers/staging/rtl8723au/include/odm_debug.h
deleted file mode 100644
index c4b375a..0000000
diff --git a/drivers/staging/rtl8723au/include/odm_interface.h b/drivers/staging/rtl8723au/include/odm_interface.h
deleted file mode 100644
index 1d3bf03..0000000
diff --git a/drivers/staging/rtl8723au/include/odm_precomp.h b/drivers/staging/rtl8723au/include/odm_precomp.h
deleted file mode 100644
index fb793c8..0000000
diff --git a/drivers/staging/rtl8723au/include/odm_reg.h b/drivers/staging/rtl8723au/include/odm_reg.h
deleted file mode 100644
index c1843312..0000000
diff --git a/drivers/staging/rtl8723au/include/osdep_intf.h b/drivers/staging/rtl8723au/include/osdep_intf.h
deleted file mode 100644
index a157eb2..0000000
diff --git a/drivers/staging/rtl8723au/include/osdep_service.h b/drivers/staging/rtl8723au/include/osdep_service.h
deleted file mode 100644
index 33ecb9c..0000000
diff --git a/drivers/staging/rtl8723au/include/recv_osdep.h b/drivers/staging/rtl8723au/include/recv_osdep.h
deleted file mode 100644
index c2d3f1b..0000000
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h
deleted file mode 100644
index 7add5df..0000000
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h
deleted file mode 100644
index 4733559..0000000
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_cmd.h b/drivers/staging/rtl8723au/include/rtl8723a_cmd.h
deleted file mode 100644
index f95535a..0000000
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_dm.h b/drivers/staging/rtl8723au/include/rtl8723a_dm.h
deleted file mode 100644
index bf236e8..0000000
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_hal.h b/drivers/staging/rtl8723au/include/rtl8723a_hal.h
deleted file mode 100644
index 77a0fd4..0000000
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_pg.h b/drivers/staging/rtl8723au/include/rtl8723a_pg.h
deleted file mode 100644
index 5c2ec44..0000000
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_recv.h b/drivers/staging/rtl8723au/include/rtl8723a_recv.h
deleted file mode 100644
index 875d37b..0000000
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_rf.h b/drivers/staging/rtl8723au/include/rtl8723a_rf.h
deleted file mode 100644
index 0432799..0000000
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_spec.h b/drivers/staging/rtl8723au/include/rtl8723a_spec.h
deleted file mode 100644
index 2f18689..0000000
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_sreset.h b/drivers/staging/rtl8723au/include/rtl8723a_sreset.h
deleted file mode 100644
index 6197910..0000000
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_xmit.h b/drivers/staging/rtl8723au/include/rtl8723a_xmit.h
deleted file mode 100644
index 7db29f4..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_ap.h b/drivers/staging/rtl8723au/include/rtw_ap.h
deleted file mode 100644
index 55a708f..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_cmd.h b/drivers/staging/rtl8723au/include/rtw_cmd.h
deleted file mode 100644
index d1fa95d..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_debug.h b/drivers/staging/rtl8723au/include/rtw_debug.h
deleted file mode 100644
index 159183e..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_eeprom.h b/drivers/staging/rtl8723au/include/rtw_eeprom.h
deleted file mode 100644
index a86f36e..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_efuse.h b/drivers/staging/rtl8723au/include/rtw_efuse.h
deleted file mode 100644
index c577e26..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_event.h b/drivers/staging/rtl8723au/include/rtw_event.h
deleted file mode 100644
index 4557aec..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_ht.h b/drivers/staging/rtl8723au/include/rtw_ht.h
deleted file mode 100644
index 780eb89..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_io.h b/drivers/staging/rtl8723au/include/rtw_io.h
deleted file mode 100644
index d875e9e..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_mlme.h b/drivers/staging/rtl8723au/include/rtw_mlme.h
deleted file mode 100644
index dbd3a5f..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h
deleted file mode 100644
index 0e7d3da..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_pwrctrl.h b/drivers/staging/rtl8723au/include/rtw_pwrctrl.h
deleted file mode 100644
index 699b9f3..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_recv.h b/drivers/staging/rtl8723au/include/rtw_recv.h
deleted file mode 100644
index 85a5edb..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_rf.h b/drivers/staging/rtl8723au/include/rtw_rf.h
deleted file mode 100644
index a7de714..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_security.h b/drivers/staging/rtl8723au/include/rtw_security.h
deleted file mode 100644
index 624a9d7..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_sreset.h b/drivers/staging/rtl8723au/include/rtw_sreset.h
deleted file mode 100644
index 60fa829..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_version.h b/drivers/staging/rtl8723au/include/rtw_version.h
deleted file mode 100644
index c947733..0000000
diff --git a/drivers/staging/rtl8723au/include/rtw_xmit.h b/drivers/staging/rtl8723au/include/rtw_xmit.h
deleted file mode 100644
index 24f326b..0000000
diff --git a/drivers/staging/rtl8723au/include/sta_info.h b/drivers/staging/rtl8723au/include/sta_info.h
deleted file mode 100644
index e726005..0000000
diff --git a/drivers/staging/rtl8723au/include/usb_ops.h b/drivers/staging/rtl8723au/include/usb_ops.h
deleted file mode 100644
index ff11e13..0000000
diff --git a/drivers/staging/rtl8723au/include/usb_ops_linux.h b/drivers/staging/rtl8723au/include/usb_ops_linux.h
deleted file mode 100644
index af2f14b..0000000
diff --git a/drivers/staging/rtl8723au/include/wifi.h b/drivers/staging/rtl8723au/include/wifi.h
deleted file mode 100644
index 25d573c..0000000
diff --git a/drivers/staging/rtl8723au/include/wlan_bssdef.h b/drivers/staging/rtl8723au/include/wlan_bssdef.h
deleted file mode 100644
index 95b32e1..0000000
diff --git a/drivers/staging/rtl8723au/include/xmit_osdep.h b/drivers/staging/rtl8723au/include/xmit_osdep.h
deleted file mode 100644
index 2be04c48..0000000
diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
deleted file mode 100644
index d0ba377..0000000
diff --git a/drivers/staging/rtl8723au/os_dep/mlme_linux.c b/drivers/staging/rtl8723au/os_dep/mlme_linux.c
deleted file mode 100644
index ca24369..0000000
diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c b/drivers/staging/rtl8723au/os_dep/os_intfs.c
deleted file mode 100644
index b8848c2..0000000
diff --git a/drivers/staging/rtl8723au/os_dep/recv_linux.c b/drivers/staging/rtl8723au/os_dep/recv_linux.c
deleted file mode 100644
index 084b506..0000000
diff --git a/drivers/staging/rtl8723au/os_dep/usb_intf.c b/drivers/staging/rtl8723au/os_dep/usb_intf.c
deleted file mode 100644
index fa7dda5..0000000
diff --git a/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c b/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c
deleted file mode 100644
index cf4a506..0000000
diff --git a/drivers/staging/rtl8723au/os_dep/xmit_linux.c b/drivers/staging/rtl8723au/os_dep/xmit_linux.c
deleted file mode 100644
index 64be72a..0000000
--
2.7.4
^ permalink raw reply related
* Re: [PATCH - FYI - do not apply] staging: Remove rtl8723au driver
From: Greg KH @ 2016-09-10 13:24 UTC (permalink / raw)
To: Jes.Sorensen; +Cc: devel, linux-wireless, Larry.Finger
In-Reply-To: <1473510333-26497-1-git-send-email-Jes.Sorensen@redhat.com>
On Sat, Sep 10, 2016 at 08:25:33AM -0400, Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen <Jes.Sorensen@redhat.com>
>
> Hi,
>
> I sent Greg the full version of this patch, removing the old rtl8723au
> driver. I didn't want to spam the list with a 2M+ patch so this is the
> summary version.
>
> Cheers,
> Jes
>
> This driver is superseded by rtl8xxxu and has been marked as scheduled
> for deletion since 4.6
I've now applied this to the staging tree, thanks.
greg k-h
^ permalink raw reply
* [PATCH] mac80211: Dynamically set CoDel parameters per station.
From: Toke Høiland-Jørgensen @ 2016-09-10 19:33 UTC (permalink / raw)
To: make-wifi-fast, linux-wireless
Cc: Toke Høiland-Jørgensen, Michal Kazior, Felix Fietkau
CoDel can be too aggressive if a station sends at a very low rate,
leading to starvation. This gets worse the more stations are present, as
each station gets more bursty the longer the round-robin scheduling
between stations takes.
This adds dynamic adjustment of CoDel parameters per station. It uses
the rate selection information to estimate throughput and sets more
lenient CoDel parameters if the estimated throughput is below a
threshold. To not change parameters too often, a hysteresis of two
seconds is added.
A new callback is added that drivers can use to notify mac80211 about
changes in expected throughput, so the same adjustment can be made for
cards that implement rate control in firmware. Drivers that don't use
this will just get the default parameters.
The threshold used and the CoDel parameters set for slow stations are
chosen to err on the side of caution. I.e. rather be too lenient than
too aggressive. A better algorithm can then be added later.
Cc: Michal Kazior <michal.kazior@tieto.com>
Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@toke.dk>
---
include/net/mac80211.h | 17 +++++++++++++++++
net/mac80211/rate.c | 2 ++
net/mac80211/sta_info.c | 35 +++++++++++++++++++++++++++++++++++
net/mac80211/sta_info.h | 12 ++++++++++++
net/mac80211/tx.c | 9 ++++++++-
5 files changed, 74 insertions(+), 1 deletion(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index cca510a..6e0cf85 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -4089,6 +4089,23 @@ void ieee80211_get_tx_rates(struct ieee80211_vif *=
vif,
int max_rates);
=20
/**
+ * ieee80211_sta_set_expected_throughput - set the expected throughput f=
or a
+ * station
+ *
+ * Call this function to notify mac80211 about a change in expected thro=
ughput
+ * to a station. A driver for a device that does rate control in firmwar=
e can
+ * call this function when the expected throughput estimate towards a st=
ation
+ * changes. The information is used to tune the CoDel AQM applied to tra=
ffic
+ * going towards that station (which can otherwise be too aggressive and=
cause
+ * slow stations to starve).
+ *
+ * @sta: the station to set throughput for.
+ * @thr: the current expected throughput in kbps.
+ */
+void ieee80211_sta_set_expected_throughput(struct ieee80211_sta *pubsta,
+ u32 thr);
+
+/**
* ieee80211_tx_status - transmit status callback
*
* Call this function for all transmitted frames after they have been
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 206698b..5370f5c 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -890,6 +890,8 @@ int rate_control_set_rates(struct ieee80211_hw *hw,
=20
drv_sta_rate_tbl_update(hw_to_local(hw), sta->sdata, pubsta);
=20
+ sta_update_codel_params(sta, sta_get_expected_throughput(sta));
+
return 0;
}
EXPORT_SYMBOL(rate_control_set_rates);
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 19f14c9..6deda4a 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -20,6 +20,7 @@
#include <linux/timer.h>
#include <linux/rtnetlink.h>
=20
+#include <net/codel.h>
#include <net/mac80211.h>
#include "ieee80211_i.h"
#include "driver-ops.h"
@@ -419,6 +420,8 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_=
if_data *sdata,
=20
sta->sta.max_rc_amsdu_len =3D IEEE80211_MAX_MPDU_LEN_HT_BA;
=20
+ sta_update_codel_params(sta, 0);
+
sta_dbg(sdata, "Allocated STA %pM\n", sta->sta.addr);
=20
return sta;
@@ -2306,6 +2309,15 @@ u32 sta_get_expected_throughput(struct sta_info *s=
ta)
return thr;
}
=20
+void ieee80211_sta_set_expected_throughput(struct ieee80211_sta *pubsta,
+ u32 thr)
+{
+ struct sta_info *sta =3D container_of(pubsta, struct sta_info, sta);
+
+ sta_update_codel_params(sta, thr);
+}
+EXPORT_SYMBOL(ieee80211_sta_set_expected_throughput);
+
unsigned long ieee80211_sta_last_active(struct sta_info *sta)
{
struct ieee80211_sta_rx_stats *stats =3D sta_get_last_rx_stats(sta);
@@ -2314,3 +2326,26 @@ unsigned long ieee80211_sta_last_active(struct sta=
_info *sta)
return stats->last_rx;
return sta->status_stats.last_ack;
}
+
+void sta_update_codel_params(struct sta_info *sta, u32 thr)
+{
+ u64 now =3D ktime_get_ns();
+
+ if (!sta->sdata->local->ops->wake_tx_queue)
+ return;
+
+ if (now - sta->cparams.update_time < STA_CPARAMS_HYSTERESIS)
+ return;
+
+ if (thr && thr < STA_SLOW_THRESHOLD) {
+ sta->cparams.params.target =3D MS2TIME(50);
+ sta->cparams.params.interval =3D MS2TIME(300);
+ sta->cparams.params.ecn =3D false;
+ } else {
+ sta->cparams.params.target =3D MS2TIME(20);
+ sta->cparams.params.interval =3D MS2TIME(100);
+ sta->cparams.params.ecn =3D true;
+ }
+ sta->cparams.params.ce_threshold =3D CODEL_DISABLED_THRESHOLD;
+ sta->cparams.update_time =3D now;
+}
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 0556be3..ad088ff 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -384,6 +384,14 @@ struct ieee80211_sta_rx_stats {
u64 msdu[IEEE80211_NUM_TIDS + 1];
};
=20
+#define STA_CPARAMS_HYSTERESIS (2L * NSEC_PER_SEC)
+#define STA_SLOW_THRESHOLD 8000 /* 8 Mbps */
+
+struct sta_codel_params {
+ struct codel_params params;
+ u64 update_time;
+};
+
/**
* struct sta_info - STA information
*
@@ -437,6 +445,7 @@ struct ieee80211_sta_rx_stats {
* @known_smps_mode: the smps_mode the client thinks we are in. Relevant=
for
* AP only.
* @cipher_scheme: optional cipher scheme for this station
+ * @cparams: CoDel parameters for this station.
* @reserved_tid: reserved TID (if any, otherwise IEEE80211_TID_UNRESERV=
ED)
* @fast_tx: TX fastpath information
* @fast_rx: RX fastpath information
@@ -540,6 +549,8 @@ struct sta_info {
enum ieee80211_smps_mode known_smps_mode;
const struct ieee80211_cipher_scheme *cipher_scheme;
=20
+ struct sta_codel_params cparams;
+
u8 reserved_tid;
=20
struct cfg80211_chan_def tdls_chandef;
@@ -713,6 +724,7 @@ void sta_set_rate_info_tx(struct sta_info *sta,
void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo);
=20
u32 sta_get_expected_throughput(struct sta_info *sta);
+void sta_update_codel_params(struct sta_info *sta, u32 thr);
=20
void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
unsigned long exp_time);
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index efc38e7..ec60ac1 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1342,9 +1342,16 @@ static struct sk_buff *fq_tin_dequeue_func(struct =
fq *fq,
=20
local =3D container_of(fq, struct ieee80211_local, fq);
txqi =3D container_of(tin, struct txq_info, tin);
- cparams =3D &local->cparams;
cstats =3D &local->cstats;
=20
+ if (txqi->txq.sta) {
+ struct sta_info *sta =3D container_of(txqi->txq.sta,
+ struct sta_info, sta);
+ cparams =3D &sta->cparams.params;
+ } else {
+ cparams =3D &local->cparams;
+ }
+
if (flow =3D=3D &txqi->def_flow)
cvars =3D &txqi->def_cvars;
else
--=20
2.9.3
base-commit: abc3750c31320f36e230f88b235a90e0a35f7032
^ permalink raw reply related
* Re: [Make-wifi-fast] [PATCH] mac80211: Dynamically set CoDel parameters per station.
From: Toke Høiland-Jørgensen @ 2016-09-10 20:09 UTC (permalink / raw)
To: Jim Gettys; +Cc: make-wifi-fast, linux-wireless, Felix Fietkau
In-Reply-To: <CAGhGL2D8Hfed0VTsinnCbkK31dGTc=bYjzpPfrcLRnp+x6O3sA@mail.gmail.com>
Jim Gettys <jg@freedesktop.org> writes:
>> On Sat, Sep 10, 2016 at 3:33 PM, Toke H=C3=B8iland-J=C3=B8rgensen <toke@=
toke.dk> wrote:
>>
>> CoDel can be too aggressive if a station sends at a very low rate,
>> leading to starvation. This gets worse the more stations are present, as
>> each station gets more bursty the longer the round-robin scheduling
>> between stations takes.
>>
>> This adds dynamic adjustment of CoDel parameters per station. It uses
>> the rate selection information to estimate throughput and sets more
>> lenient CoDel parameters if the estimated throughput is below a
>> threshold. To not change parameters too often, a hysteresis of two
>> seconds is added.
>
> =E2=80=8BWhere is this 2 second constant coming from? I'd expect it shoul=
d be
> of order the maximum RTT (or a small constant factor of that, which
> for intercontinental connections should be 200-300ms.
Well, in most cases a station is either going to be squarely below or
squarely above the threshold. The hysteresis is there to deal with the
exception to this, where a station's rate oscillates around the
threshold. I picked two seconds as something that is far enough above
the CoDel interval to hopefully let it do its thing.
> More interestingly, maybe the adjustment should be related to the # of
> active stations.
There is no doubt the algorithm can be improved. This is just a stopgap
measure to avoid starving slow stations. The CoDel parameters for slow
stations could be set smarter as well, or they could be scaled with the
rate instead of being threshold based. But since we have FQ, being
lenient can work without affecting latency too much.
> Basically, I'm pushing back about an arbitrary number apparently
> picked out of thin air... ;-).
You're very welcome to contribute to coming up with a better solution ;)
-Toke
^ permalink raw reply
* Re: [PATCH] mac80211: Dynamically set CoDel parameters per station.
From: kbuild test robot @ 2016-09-11 0:09 UTC (permalink / raw)
To: Toke Høiland-Jørgensen
Cc: kbuild-all, make-wifi-fast, linux-wireless,
Toke Høiland-Jørgensen, Michal Kazior, Felix Fietkau
In-Reply-To: <20160910193315.30738-1-toke@toke.dk>
[-- Attachment #1: Type: text/plain, Size: 3725 bytes --]
Hi Toke,
[auto build test WARNING on ]
url: https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/mac80211-Dynamically-set-CoDel-parameters-per-station/20160911-033626
base:
reproduce: make htmldocs
All warnings (new ones prefixed by >>):
>> include/net/mac80211.h:4106: warning: No description found for parameter 'pubsta'
>> include/net/mac80211.h:4106: warning: Excess function parameter 'sta' description in 'ieee80211_sta_set_expected_throughput'
>> include/net/mac80211.h:4106: warning: No description found for parameter 'pubsta'
>> include/net/mac80211.h:4106: warning: Excess function parameter 'sta' description in 'ieee80211_sta_set_expected_throughput'
>> include/net/mac80211.h:4106: warning: No description found for parameter 'pubsta'
>> include/net/mac80211.h:4106: warning: Excess function parameter 'sta' description in 'ieee80211_sta_set_expected_throughput'
>> include/net/mac80211.h:4106: warning: No description found for parameter 'pubsta'
>> include/net/mac80211.h:4106: warning: Excess function parameter 'sta' description in 'ieee80211_sta_set_expected_throughput'
>> include/net/mac80211.h:4106: warning: No description found for parameter 'pubsta'
>> include/net/mac80211.h:4106: warning: Excess function parameter 'sta' description in 'ieee80211_sta_set_expected_throughput'
>> include/net/mac80211.h:4106: warning: No description found for parameter 'pubsta'
>> include/net/mac80211.h:4106: warning: Excess function parameter 'sta' description in 'ieee80211_sta_set_expected_throughput'
>> include/net/mac80211.h:4106: warning: No description found for parameter 'pubsta'
>> include/net/mac80211.h:4106: warning: Excess function parameter 'sta' description in 'ieee80211_sta_set_expected_throughput'
>> include/net/mac80211.h:4106: warning: No description found for parameter 'pubsta'
>> include/net/mac80211.h:4106: warning: Excess function parameter 'sta' description in 'ieee80211_sta_set_expected_throughput'
>> include/net/mac80211.h:4106: warning: No description found for parameter 'pubsta'
>> include/net/mac80211.h:4106: warning: Excess function parameter 'sta' description in 'ieee80211_sta_set_expected_throughput'
>> include/net/mac80211.h:4106: warning: No description found for parameter 'pubsta'
>> include/net/mac80211.h:4106: warning: Excess function parameter 'sta' description in 'ieee80211_sta_set_expected_throughput'
vim +/pubsta +4106 include/net/mac80211.h
4090
4091 /**
4092 * ieee80211_sta_set_expected_throughput - set the expected throughput for a
4093 * station
4094 *
4095 * Call this function to notify mac80211 about a change in expected throughput
4096 * to a station. A driver for a device that does rate control in firmware can
4097 * call this function when the expected throughput estimate towards a station
4098 * changes. The information is used to tune the CoDel AQM applied to traffic
4099 * going towards that station (which can otherwise be too aggressive and cause
4100 * slow stations to starve).
4101 *
4102 * @sta: the station to set throughput for.
4103 * @thr: the current expected throughput in kbps.
4104 */
4105 void ieee80211_sta_set_expected_throughput(struct ieee80211_sta *pubsta,
> 4106 u32 thr);
4107
4108 /**
4109 * ieee80211_tx_status - transmit status callback
4110 *
4111 * Call this function for all transmitted frames after they have been
4112 * transmitted. It is permissible to not call this function for
4113 * multicast frames but this can affect statistics.
4114 *
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 6422 bytes --]
^ permalink raw reply
* Re: [Make-wifi-fast] [PATCH] mac80211: Dynamically set CoDel parameters per station.
From: Loganaden Velvindron @ 2016-09-11 3:16 UTC (permalink / raw)
To: Jim Gettys
Cc: Toke Høiland-Jørgensen, make-wifi-fast, linux-wireless,
Felix Fietkau
In-Reply-To: <CAGhGL2D8Hfed0VTsinnCbkK31dGTc=bYjzpPfrcLRnp+x6O3sA@mail.gmail.com>
On Sat, Sep 10, 2016 at 11:54 PM, Jim Gettys <jg@freedesktop.org> wrote:
>
>
> On Sat, Sep 10, 2016 at 3:33 PM, Toke H=C3=B8iland-J=C3=B8rgensen <toke@t=
oke.dk>
> wrote:
>>
>> CoDel can be too aggressive if a station sends at a very low rate,
>> leading to starvation. This gets worse the more stations are present, as
>> each station gets more bursty the longer the round-robin scheduling
>> between stations takes.
>>
>> This adds dynamic adjustment of CoDel parameters per station. It uses
>> the rate selection information to estimate throughput and sets more
>> lenient CoDel parameters if the estimated throughput is below a
>> threshold. To not change parameters too often, a hysteresis of two
>> seconds is added.
>
>
> Where is this 2 second constant coming from? I'd expect it should be of
> order the maximum RTT (or a small constant factor of that, which for
> intercontinental connections should be 200-300ms.
>
Indeed, from Mauritius (Africa) to remote countries like Australia, or
parts of the US, we see latencies of up to 500-600ms.
^ permalink raw reply
* [PATCH v2] cfg80211: add bitrate for 20MHz MCS 9
From: Thomas Pedersen @ 2016-09-11 6:35 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, greearb, Thomas Pedersen
Some drivers (ath10k) report MCS 9 @ 20MHz, which
technically isn't defined. To get more meaningful value
than 0 out of this however, just extrapolate a bitrate
from ratio of MCS 7 and 9 in channels where it is allowed.
Signed-off-by: Thomas Pedersen <twp@qca.qualcomm.com>
---
v2: add MCS 9 bitrate instead of capping at MCS 8
---
net/wireless/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wireless/util.c b/net/wireless/util.c
index b7d1592..3e83170 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1157,7 +1157,7 @@ static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate)
58500000,
65000000,
78000000,
- 0,
+ 86500000,
},
{ 13500000,
27000000,
--
2.1.4
^ permalink raw reply related
* [PATCH 00/26] constify local structures
From: Julia Lawall @ 2016-09-11 13:05 UTC (permalink / raw)
To: linux-renesas-soc
Cc: joe, kernel-janitors, Sergei Shtylyov, linux-pm,
platform-driver-x86, linux-media, linux-can, Tatyana Nikolova,
Shiraz Saleem, Mustafa Ismail, Chien Tin Tung, linux-rdma, netdev,
devel, alsa-devel, linux-kernel, linux-fbdev, linux-wireless,
Jason Gunthorpe, tpmdd-devel, linux-scsi, linux-spi, linux-usb,
linux-acpi
Constify local structures.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
// The first rule ignores some cases that posed problems
@r disable optional_qualifier@
identifier s != {peri_clk_data,threshold_attr,tracer_flags,tracer};
identifier i != {s5k5baf_cis_rect,smtcfb_fix};
position p;
@@
static struct s i@p = { ... };
@lstruct@
identifier r.s;
@@
struct s { ... };
@used depends on lstruct@
identifier r.i;
@@
i
@bad1@
expression e;
identifier r.i;
assignment operator a;
@@
(<+...i...+>) a e
@bad2@
identifier r.i;
@@
&(<+...i...+>)
@bad3@
identifier r.i;
declarer d;
@@
d(...,<+...i...+>,...);
@bad4@
identifier r.i;
type T;
T[] e;
identifier f;
position p;
@@
f@p(...,
(
(<+...i...+>)
&
e
)
,...)
@bad4a@
identifier r.i;
type T;
T *e;
identifier f;
position p;
@@
f@p(...,
(
(<+...i...+>)
&
e
)
,...)
@ok5@
expression *e;
identifier r.i;
position p;
@@
e =@p i
@bad5@
expression *e;
identifier r.i;
position p != ok5.p;
@@
e =@p (<+...i...+>)
@rr depends on used && !bad1 && !bad2 && !bad3 && !bad4 && !bad4a && !bad5@
identifier s,r.i;
position r.p;
@@
static
+const
struct s i@p = { ... };
@depends on used && !bad1 && !bad2 && !bad3 && !bad4 && !bad4a && !bad5
disable optional_qualifier@
identifier rr.s,r.i;
@@
static
+const
struct s i;
// </smpl>
---
drivers/acpi/acpi_apd.c | 8 +++---
drivers/char/tpm/tpm-interface.c | 10 ++++----
drivers/char/tpm/tpm-sysfs.c | 2 -
drivers/cpufreq/intel_pstate.c | 8 +++---
drivers/infiniband/hw/i40iw/i40iw_uk.c | 6 ++---
drivers/media/i2c/tvp514x.c | 2 -
drivers/media/pci/ddbridge/ddbridge-core.c | 18 +++++++--------
drivers/media/pci/ngene/ngene-cards.c | 14 ++++++------
drivers/media/pci/smipcie/smipcie-main.c | 8 +++---
drivers/misc/sgi-xp/xpc_uv.c | 2 -
drivers/net/arcnet/com20020-pci.c | 10 ++++----
drivers/net/can/c_can/c_can_pci.c | 4 +--
drivers/net/can/sja1000/plx_pci.c | 20 ++++++++---------
drivers/net/ethernet/mellanox/mlx4/main.c | 4 +--
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 -
drivers/net/ethernet/renesas/sh_eth.c | 14 ++++++------
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 2 -
drivers/net/wireless/ath/dfs_pattern_detector.c | 2 -
drivers/net/wireless/intel/iwlegacy/3945.c | 4 +--
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 2 -
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 2 -
drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 2 -
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 2 -
drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 2 -
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 2 -
drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 2 -
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 2 -
drivers/platform/chrome/chromeos_laptop.c | 22 +++++++++----------
drivers/platform/x86/intel_scu_ipc.c | 6 ++---
drivers/platform/x86/intel_telemetry_debugfs.c | 2 -
drivers/scsi/esas2r/esas2r_flash.c | 2 -
drivers/scsi/hptiop.c | 6 ++---
drivers/spi/spi-dw-pci.c | 4 +--
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 -
drivers/usb/misc/ezusb.c | 2 -
drivers/video/fbdev/matrox/matroxfb_g450.c | 2 -
lib/crc64_ecma.c | 2 -
sound/pci/ctxfi/ctatc.c | 2 -
sound/pci/hda/patch_ca0132.c | 10 ++++----
sound/pci/riptide/riptide.c | 2 -
40 files changed, 110 insertions(+), 110 deletions(-)
^ permalink raw reply
* [PATCH 06/26] ath: constify local structures
From: Julia Lawall @ 2016-09-11 13:05 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: joe, kernel-janitors, Kalle Valo, linux-wireless, netdev,
linux-kernel
In-Reply-To: <1473599168-30561-1-git-send-email-Julia.Lawall@lip6.fr>
For structure types defined in the same file or local header files, find
top-level static structure declarations that have the following
properties:
1. Never reassigned.
2. Address never taken
3. Not passed to a top-level macro call
4. No pointer or array-typed field passed to a function or stored in a
variable.
Declare structures having all of these properties as const.
Done using Coccinelle.
Based on a suggestion by Joe Perches <joe@perches.com>.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
The semantic patch seems too long for a commit log, but is in the cover
letter.
drivers/net/wireless/ath/dfs_pattern_detector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.c b/drivers/net/wireless/ath/dfs_pattern_detector.c
index 2f8136d..4100ffd 100644
--- a/drivers/net/wireless/ath/dfs_pattern_detector.c
+++ b/drivers/net/wireless/ath/dfs_pattern_detector.c
@@ -338,7 +338,7 @@ static bool dpd_set_domain(struct dfs_pattern_detector *dpd,
return true;
}
-static struct dfs_pattern_detector default_dpd = {
+static const struct dfs_pattern_detector default_dpd = {
.exit = dpd_exit,
.set_dfs_domain = dpd_set_domain,
.add_pulse = dpd_add_pulse,
^ permalink raw reply related
* [PATCH 08/26] iwlegacy: constify local structures
From: Julia Lawall @ 2016-09-11 13:05 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: joe, kernel-janitors, Kalle Valo, linux-wireless, netdev,
linux-kernel
In-Reply-To: <1473599168-30561-1-git-send-email-Julia.Lawall@lip6.fr>
For structure types defined in the same file or local header files, find
top-level static structure declarations that have the following
properties:
1. Never reassigned.
2. Address never taken
3. Not passed to a top-level macro call
4. No pointer or array-typed field passed to a function or stored in a
variable.
Declare structures having all of these properties as const.
Done using Coccinelle.
Based on a suggestion by Joe Perches <joe@perches.com>.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
The semantic patch seems too long for a commit log, but is in the cover
letter.
drivers/net/wireless/intel/iwlegacy/3945.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlegacy/3945.c b/drivers/net/wireless/intel/iwlegacy/3945.c
index 209dc99..4db327a 100644
--- a/drivers/net/wireless/intel/iwlegacy/3945.c
+++ b/drivers/net/wireless/intel/iwlegacy/3945.c
@@ -2671,7 +2671,7 @@ const struct il_ops il3945_ops = {
.send_led_cmd = il3945_send_led_cmd,
};
-static struct il_cfg il3945_bg_cfg = {
+static const struct il_cfg il3945_bg_cfg = {
.name = "3945BG",
.fw_name_pre = IL3945_FW_PRE,
.ucode_api_max = IL3945_UCODE_API_MAX,
@@ -2700,7 +2700,7 @@ static struct il_cfg il3945_bg_cfg = {
},
};
-static struct il_cfg il3945_abg_cfg = {
+static const struct il_cfg il3945_abg_cfg = {
.name = "3945ABG",
.fw_name_pre = IL3945_FW_PRE,
.ucode_api_max = IL3945_UCODE_API_MAX,
^ permalink raw reply related
* [PATCH 21/26] rtlwifi: rtl818x: constify local structures
From: Julia Lawall @ 2016-09-11 13:06 UTC (permalink / raw)
To: Larry Finger
Cc: joe, kernel-janitors, Chaoming Li, Kalle Valo, linux-wireless,
netdev, linux-kernel
In-Reply-To: <1473599168-30561-1-git-send-email-Julia.Lawall@lip6.fr>
For structure types defined in the same file or local header files, find
top-level static structure declarations that have the following
properties:
1. Never reassigned.
2. Address never taken
3. Not passed to a top-level macro call
4. No pointer or array-typed field passed to a function or stored in a
variable.
Declare structures having all of these properties as const.
Done using Coccinelle.
Based on a suggestion by Joe Perches <joe@perches.com>.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
The semantic patch seems too long for a commit log, but is in the cover
letter.
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c
index 47e32cb..e7b11b4 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c
@@ -280,7 +280,7 @@ static struct rtl_mod_params rtl88ee_mod_params = {
.debug = DBG_EMERG,
};
-static struct rtl_hal_cfg rtl88ee_hal_cfg = {
+static const struct rtl_hal_cfg rtl88ee_hal_cfg = {
.bar_id = 2,
.write_readback = true,
.name = "rtl88e_pci",
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c
index 4780bdc..87aa209 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c
@@ -258,7 +258,7 @@ static struct rtl_mod_params rtl92ce_mod_params = {
.debug = DBG_EMERG,
};
-static struct rtl_hal_cfg rtl92ce_hal_cfg = {
+static const struct rtl_hal_cfg rtl92ce_hal_cfg = {
.bar_id = 2,
.write_readback = true,
.name = "rtl92c_pci",
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c
index c6e09a1..0538a4d 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c
@@ -262,7 +262,7 @@ static struct rtl_mod_params rtl92de_mod_params = {
.debug = DBG_EMERG,
};
-static struct rtl_hal_cfg rtl92de_hal_cfg = {
+static const struct rtl_hal_cfg rtl92de_hal_cfg = {
.bar_id = 2,
.write_readback = true,
.name = "rtl8192de",
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c
index c31c6bf..ac299cb 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c
@@ -262,7 +262,7 @@ static struct rtl_mod_params rtl92ee_mod_params = {
.debug = DBG_EMERG,
};
-static struct rtl_hal_cfg rtl92ee_hal_cfg = {
+static const struct rtl_hal_cfg rtl92ee_hal_cfg = {
.bar_id = 2,
.write_readback = true,
.name = "rtl92ee_pci",
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c
index 31baca41..5e8e02d 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c
@@ -306,7 +306,7 @@ static struct rtl_mod_params rtl92se_mod_params = {
/* Because memory R/W bursting will cause system hang/crash
* for 92se, so we don't read back after every write action */
-static struct rtl_hal_cfg rtl92se_hal_cfg = {
+static const struct rtl_hal_cfg rtl92se_hal_cfg = {
.bar_id = 1,
.write_readback = false,
.name = "rtl92s_pci",
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
index ff49a8c..89c828a 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
@@ -276,7 +276,7 @@ static struct rtl_mod_params rtl8723e_mod_params = {
.disable_watchdog = false,
};
-static struct rtl_hal_cfg rtl8723e_hal_cfg = {
+static const struct rtl_hal_cfg rtl8723e_hal_cfg = {
.bar_id = 2,
.write_readback = true,
.name = "rtl8723e_pci",
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
index 2101793..20b53f0 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
@@ -276,7 +276,7 @@ static struct rtl_mod_params rtl8723be_mod_params = {
.ant_sel = 0,
};
-static struct rtl_hal_cfg rtl8723be_hal_cfg = {
+static const struct rtl_hal_cfg rtl8723be_hal_cfg = {
.bar_id = 2,
.write_readback = true,
.name = "rtl8723be_pci",
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c
index 4159f9b..22f687b1 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c
@@ -316,7 +316,7 @@ static struct rtl_mod_params rtl8821ae_mod_params = {
.disable_watchdog = 0,
};
-static struct rtl_hal_cfg rtl8821ae_hal_cfg = {
+static const struct rtl_hal_cfg rtl8821ae_hal_cfg = {
.bar_id = 2,
.write_readback = true,
.name = "rtl8821ae_pci",
^ permalink raw reply related
* Re: [PATCH 00/26] constify local structures
From: Jarkko Sakkinen @ 2016-09-11 17:21 UTC (permalink / raw)
To: Julia Lawall
Cc: linux-renesas-soc, joe, kernel-janitors, Sergei Shtylyov,
linux-pm, platform-driver-x86, linux-media, linux-can,
Tatyana Nikolova, Shiraz Saleem, Mustafa Ismail, Chien Tin Tung,
linux-rdma, netdev, devel, alsa-devel, linux-kernel, linux-fbdev,
linux-wireless, Jason Gunthorpe, tpmdd-devel, linux-scsi,
linux-spi, linux-usb, linux-acpi
In-Reply-To: <1473599168-30561-1-git-send-email-Julia.Lawall@lip6.fr>
On Sun, Sep 11, 2016 at 03:05:42PM +0200, Julia Lawall wrote:
> Constify local structures.
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
Just my two cents but:
1. You *can* use a static analysis too to find bugs or other issues.
2. However, you should manually do the commits and proper commit
messages to subsystems based on your findings. And I generally think
that if one contributes code one should also at least smoke test changes
somehow.
I don't know if I'm alone with my opinion. I just think that one should
also do the analysis part and not blindly create and submit patches.
Anyway, I'll apply the TPM change at some point. As I said they were
for better. Thanks.
/Jarkko
> // <smpl>
> // The first rule ignores some cases that posed problems
> @r disable optional_qualifier@
> identifier s != {peri_clk_data,threshold_attr,tracer_flags,tracer};
> identifier i != {s5k5baf_cis_rect,smtcfb_fix};
> position p;
> @@
> static struct s i@p = { ... };
>
> @lstruct@
> identifier r.s;
> @@
> struct s { ... };
>
> @used depends on lstruct@
> identifier r.i;
> @@
> i
>
> @bad1@
> expression e;
> identifier r.i;
> assignment operator a;
> @@
> (<+...i...+>) a e
>
> @bad2@
> identifier r.i;
> @@
> &(<+...i...+>)
>
> @bad3@
> identifier r.i;
> declarer d;
> @@
> d(...,<+...i...+>,...);
>
> @bad4@
> identifier r.i;
> type T;
> T[] e;
> identifier f;
> position p;
> @@
>
> f@p(...,
> (
> (<+...i...+>)
> &
> e
> )
> ,...)
>
> @bad4a@
> identifier r.i;
> type T;
> T *e;
> identifier f;
> position p;
> @@
>
> f@p(...,
> (
> (<+...i...+>)
> &
> e
> )
> ,...)
>
> @ok5@
> expression *e;
> identifier r.i;
> position p;
> @@
> e =@p i
>
> @bad5@
> expression *e;
> identifier r.i;
> position p != ok5.p;
> @@
> e =@p (<+...i...+>)
>
> @rr depends on used && !bad1 && !bad2 && !bad3 && !bad4 && !bad4a && !bad5@
> identifier s,r.i;
> position r.p;
> @@
>
> static
> +const
> struct s i@p = { ... };
>
> @depends on used && !bad1 && !bad2 && !bad3 && !bad4 && !bad4a && !bad5
> disable optional_qualifier@
> identifier rr.s,r.i;
> @@
>
> static
> +const
> struct s i;
> // </smpl>
>
> ---
>
> drivers/acpi/acpi_apd.c | 8 +++---
> drivers/char/tpm/tpm-interface.c | 10 ++++----
> drivers/char/tpm/tpm-sysfs.c | 2 -
> drivers/cpufreq/intel_pstate.c | 8 +++---
> drivers/infiniband/hw/i40iw/i40iw_uk.c | 6 ++---
> drivers/media/i2c/tvp514x.c | 2 -
> drivers/media/pci/ddbridge/ddbridge-core.c | 18 +++++++--------
> drivers/media/pci/ngene/ngene-cards.c | 14 ++++++------
> drivers/media/pci/smipcie/smipcie-main.c | 8 +++---
> drivers/misc/sgi-xp/xpc_uv.c | 2 -
> drivers/net/arcnet/com20020-pci.c | 10 ++++----
> drivers/net/can/c_can/c_can_pci.c | 4 +--
> drivers/net/can/sja1000/plx_pci.c | 20 ++++++++---------
> drivers/net/ethernet/mellanox/mlx4/main.c | 4 +--
> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 -
> drivers/net/ethernet/renesas/sh_eth.c | 14 ++++++------
> drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 2 -
> drivers/net/wireless/ath/dfs_pattern_detector.c | 2 -
> drivers/net/wireless/intel/iwlegacy/3945.c | 4 +--
> drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 2 -
> drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 2 -
> drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 2 -
> drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 2 -
> drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 2 -
> drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 2 -
> drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 2 -
> drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 2 -
> drivers/platform/chrome/chromeos_laptop.c | 22 +++++++++----------
> drivers/platform/x86/intel_scu_ipc.c | 6 ++---
> drivers/platform/x86/intel_telemetry_debugfs.c | 2 -
> drivers/scsi/esas2r/esas2r_flash.c | 2 -
> drivers/scsi/hptiop.c | 6 ++---
> drivers/spi/spi-dw-pci.c | 4 +--
> drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 -
> drivers/usb/misc/ezusb.c | 2 -
> drivers/video/fbdev/matrox/matroxfb_g450.c | 2 -
> lib/crc64_ecma.c | 2 -
> sound/pci/ctxfi/ctatc.c | 2 -
> sound/pci/hda/patch_ca0132.c | 10 ++++----
> sound/pci/riptide/riptide.c | 2 -
> 40 files changed, 110 insertions(+), 110 deletions(-)
^ permalink raw reply
* Re: [PATCH 00/26] constify local structures
From: Joe Perches @ 2016-09-11 17:56 UTC (permalink / raw)
To: Julia Lawall, linux-renesas-soc
Cc: kernel-janitors, Sergei Shtylyov, linux-pm, platform-driver-x86,
linux-media, linux-can, Tatyana Nikolova, Shiraz Saleem,
Mustafa Ismail, Chien Tin Tung, linux-rdma, netdev, devel,
alsa-devel, linux-kernel, linux-fbdev, linux-wireless,
Jason Gunthorpe, tpmdd-devel, linux-scsi, linux-spi, linux-usb,
linux-acpi
In-Reply-To: <1473599168-30561-1-git-send-email-Julia.Lawall@lip6.fr>
On Sun, 2016-09-11 at 15:05 +0200, Julia Lawall wrote:
> Constify local structures.
Thanks Julia.
A few suggestions & questions:
Perhaps the script should go into scripts/coccinelle/
so that future cases could be caught by the robot
and commit message referenced by the patch instances.
Can you please compile the files modified using the
appropriate defconfig/allyesconfig and show the
movement from data to const by using
$ size <object>.new/old
and include that in the changelogs (maybe next time)?
Is it possible for a rule to trace the instances where
an address of a struct or struct member is taken by
locally defined and declared function call where the
callee does not modify any dereferenced object?
ie:
struct foo {
int bar;
char *baz;
};
struct foo qux[] = {
{ 1, "description 1" },
{ 2, "dewcription 2" },
[ n, "etc" ]...,
};
void message(struct foo *msg)
{
printk("%d %s\n", msg->bar, msg->baz);
}
where some code uses
message(qux[index]);
So could a coccinelle script change:
struct foo qux[] = { to const struct foo quz[] = {
and
void message(struct foo *msg) to void message(const struct foo *msg)
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox