Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [PATCH] iwlwifi: mvm: fix interface bringup on non-ACPI configs
From: Luciano Coelho @ 2020-06-08  6:02 UTC (permalink / raw)
  To: Wang Xuerui, linux-wireless; +Cc: Gil Adam
In-Reply-To: <20191121074832.6978-1-git@xen0n.name>

On Thu, 2019-11-21 at 15:48 +0800, Wang Xuerui wrote:
> Previously the non-ACPI stub of iwl_mvm_ppag_init unconditionally
> returned -ENOENT, that in turn blocked flow of iwl_mvm_up.
> 
> Take the precedent of iwl_mvm_sar_geo_init, make iwl_mvm_ppag_init no-op
> on non-ACPI configs.
> 
> Fixes: 6ce1e5c0c207 ("iwlwifi: support per-platform antenna gain")
> Cc: Gil Adam <gil.adam@intel.com>
> Cc: Luca Coelho <luciano.coelho@intel.com>
> Signed-off-by: Wang Xuerui <git@xen0n.name>
> ---
>  drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> index d9eb2b286438..04ac47b7cae9 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> @@ -1169,7 +1169,7 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
>  
>  static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)
>  {
> -	return -ENOENT;
> +	return 0;
>  }
>  #endif /* CONFIG_ACPI */

This was already fixed in another patch.  Thanks anyway!

--
Cheers,
Luca.


^ permalink raw reply

* Re: Hang on wireless removal..
From: Sedat Dilek @ 2020-06-08  7:14 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Linus Torvalds, David S. Miller, Jakub Kicinski, linux-wireless,
	Netdev, Linux Kernel Mailing List
In-Reply-To: <5DD82C75-5868-4F2D-B90F-F6205CA85C66@sipsolutions.net>

On Sat, Jun 6, 2020 at 9:56 AM Johannes Berg <johannes@sipsolutions.net> wrote:
>
> Hi, sorry for the top post, on my phone.
>
> Yes, your analysis is spot on I think. I've got a fix for this in my jberg/mac80211 tree, there's a deadlock with a work struct and the rtnl.
>
> Sorry about that. My testing should've caught it, but that exact scenario didn't happen, and lockdep for disabled due to some unrelated issues at early boot,so this didn't show up... (I also sent fixes for the other issue in user mode Linux)
>

Is that the fix you are talking about?

commit 79ea1e12c0b8540100e89b32afb9f0e6503fad35
"cfg80211: fix management registrations deadlock"

- Sedat -

P.S.: I fixed up the top-post issue :-).

[1] https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git/commit/?id=79ea1e12c0b8540100e89b32afb9f0e6503fad35

^ permalink raw reply

* Re: Hang on wireless removal..
From: Johannes Berg @ 2020-06-08  7:15 UTC (permalink / raw)
  To: sedat.dilek
  Cc: Linus Torvalds, David S. Miller, Jakub Kicinski, linux-wireless,
	Netdev, Linux Kernel Mailing List
In-Reply-To: <CA+icZUVLb9Kq88yfB3kZCjDczmSaUE1vvRygPjGH6Ps+0PhDMQ@mail.gmail.com>

On Mon, 2020-06-08 at 09:14 +0200, Sedat Dilek wrote:
> On Sat, Jun 6, 2020 at 9:56 AM Johannes Berg <johannes@sipsolutions.net> wrote:
> > Hi, sorry for the top post, on my phone.
> > 
> > Yes, your analysis is spot on I think. I've got a fix for this in my
> > jberg/mac80211 tree, there's a deadlock with a work struct and the
> > rtnl.
> > 
> > Sorry about that. My testing should've caught it, but that exact
> > scenario didn't happen, and lockdep for disabled due to some
> > unrelated issues at early boot,so this didn't show up... (I also
> > sent fixes for the other issue in user mode Linux)
> > 
> 
> Is that the fix you are talking about?
> 
> commit 79ea1e12c0b8540100e89b32afb9f0e6503fad35
> "cfg80211: fix management registrations deadlock"

Right. I only have two fixes in that tree ;)

I'll see if I have anything else, and send it off to davem later.

johannes


^ permalink raw reply

* Re: Many errors on dmesg and weak signal with driver rtw_8822be on Kubuntu 20.04
From: Lorenz Bonat @ 2020-06-08  7:32 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless
In-Reply-To: <11df4abb-0bb5-e59f-2687-d5608b7bcb19@lwfinger.net>

[-- Attachment #1: Type: text/plain, Size: 2008 bytes --]

Hi, here it is the file I intended to send. Contact me if you need
anything else.


Il giorno lun 8 giu 2020 alle ore 01:22 Larry Finger
<Larry.Finger@lwfinger.net> ha scritto:
>

> On 6/7/20 3:39 PM, Lorenz Bonat wrote:
> > To whom it may concern,
> > I am using the last available driver on the lwfinger github
> > repository(https://github.com/lwfinger/rtlwifi_new/) for the RTL8822be
> > adapter. I am using kernel 5.7.0 and my laptop is an HP Envy x360
> > ag000xx series. I persistently have struggled with the signal
> > stability of this chip, and it continues to spit out errors into the
> > dmesg log. The signal strength is lower than in Windows 10, and when I
> > try to speedtest my internet connection I see a lot of variance
> > between runs.
> >
> > The internet is unusable when surfing the web, and it is very annoying.
> >
> > I have opened an issue on the repository of lwfinger, i will link it
> > for you because there are a lot of explanations there already.
> > https://github.com/lwfinger/rtlwifi_new/issues/607
> >
> > I am attaching a file with all the dmesg entry outputted by the
> > rtw_8822be module(dmesg | grep rtw). I have noticed that I receive a
> > lot of "timed out to flush queue 1" errors and after a while the
> > driver crashes and I receive a "purge skb(s) not reported by firmware"
> > warning.
> >
> > If you need more information please let me know, and I will provide
> > them. I am willing to test any experimental driver if you want to send
> > me some material to test.
>
> Lorenz,
>
> I do not see any attached material. Did you forget?
>
> For the rest of readers: The GitHub repo containing the rtw88 drivers is
> essentially what is found at wireless-drivers-next with 2 exceptions: 1.
> Conditional compilation needed to account for kernel API changes is added, and
> 2. I gnerally apply any patches sent by the Realtek authors as soon as they are
> posted in this ML. When there are fixes due to reviews, I update the sources.
>
> Larry



--
Laurence

[-- Attachment #2: dmesg_realtek_8822be.txt --]
[-- Type: text/plain, Size: 28513 bytes --]

[    4.141508] rtw_8822be: unknown parameter 'ant_sel' ignored
[    4.141510] rtw_8822be: unknown parameter 'ant_sel' ignored
[    4.141639] rtw_8822be 0000:03:00.0: enabling device (0000 -> 0003)
[    4.155417] rtw_8822be 0000:03:00.0: Firmware version 27.2.0, H2C version 13
[    4.454811] rtw_8822be 0000:03:00.0 wlo1: renamed from wlan0
[    6.672629] rtw_8822be 0000:03:00.0: start vif 0c:96:e6:01:ad:eb on port 0
[   21.940626] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[  169.709921] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[  290.587810] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[  444.904243] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 1204.979031] rtw_8822be 0000:03:00.0: failed to send h2c command
[ 1465.969722] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 1466.117747] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 1466.581866] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 1466.721998] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 1468.258213] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 1468.410243] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 1468.882373] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 1469.034395] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 1557.218430] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 1558.138136] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 1558.278203] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 1613.033737] rtw_8822be 0000:03:00.0: failed to send h2c command
[ 1868.814126] rtw_8822be 0000:03:00.0: failed to send h2c command
[ 2445.718528] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2445.862609] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2448.251322] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2448.395203] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2448.858853] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2448.998866] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2449.454958] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2521.039748] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left
[ 2521.539218] WARNING: CPU: 6 PID: 0 at /home/lollixzc/Downloads/rtlwifi_new/tx.c:167 rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[ 2521.539223] Modules linked in: ccm rfcomm cmac algif_hash algif_skcipher af_alg bnep binfmt_misc nls_iso8859_1 hid_sensor_accel_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg hid_sensor_hub snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi btusb edac_mce_amd btrtl snd_seq_midi_event kvm_amd btbcm btintel kvm bluetooth uvcvideo input_leds hp_wmi videobuf2_vmalloc serio_raw wmi_bmof efi_pstore sparse_keymap hid_multitouch snd_rawmidi joydev k10temp videobuf2_memops rtw_8822be(OE) rtw_pci(OE) snd_seq rtw_8822b(OE) videobuf2_v4l2 sp5100_tco ecdh_generic rtw_core(OE) ecc videobuf2_common mac80211 snd_seq_device snd_timer cdc_ether videodev usbnet r8152 mc mii snd cfg80211 soundcore ccp ucsi_acpi typec_ucsi libarc4 typec hp_accel hp_wireless lis3lv02d amd_sfh_hid(OE) mac_hid amd_sfh_pci(OE) ip6t_REJECT nf_reject_ipv6 xt_hl ip6t_rt
[ 2521.539311] RIP: 0010:rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[ 2522.054736] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[ 2569.125356] rtw_8822be 0000:03:00.0: timed out to flush queue 2
[ 2569.901429] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2585.527529] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2585.671561] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2588.187876] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2588.332158] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2971.813065] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 2971.961039] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 3282.796766] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 3367.559876] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 3726.866918] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left
[ 3727.891613] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[ 3914.878708] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4325.602652] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left
[ 4326.090789] WARNING: CPU: 3 PID: 0 at /home/lollixzc/Downloads/rtlwifi_new/tx.c:167 rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[ 4326.090790] Modules linked in: ccm rfcomm cmac algif_hash algif_skcipher af_alg bnep binfmt_misc nls_iso8859_1 hid_sensor_accel_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg hid_sensor_hub snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi btusb edac_mce_amd btrtl snd_seq_midi_event kvm_amd btbcm btintel kvm bluetooth uvcvideo input_leds hp_wmi videobuf2_vmalloc serio_raw wmi_bmof efi_pstore sparse_keymap hid_multitouch snd_rawmidi joydev k10temp videobuf2_memops rtw_8822be(OE) rtw_pci(OE) snd_seq rtw_8822b(OE) videobuf2_v4l2 sp5100_tco ecdh_generic rtw_core(OE) ecc videobuf2_common mac80211 snd_seq_device snd_timer cdc_ether videodev usbnet r8152 mc mii snd cfg80211 soundcore ccp ucsi_acpi typec_ucsi libarc4 typec hp_accel hp_wireless lis3lv02d amd_sfh_hid(OE) mac_hid amd_sfh_pci(OE) ip6t_REJECT nf_reject_ipv6 xt_hl ip6t_rt
[ 4326.090894] RIP: 0010:rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[ 4330.406670] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[ 4713.480651] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4821.406894] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4871.523659] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4871.667729] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4872.600186] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4872.744263] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4873.212494] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4873.352583] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4873.808824] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4873.948897] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4874.421130] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4874.933391] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4875.077421] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4875.921883] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4876.066058] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4876.534269] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4876.682231] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4877.150502] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4877.290542] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4877.754775] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4877.902849] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4878.371071] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4878.519143] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4878.983415] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4879.131473] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4879.599733] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4879.739794] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4879.991922] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4880.131958] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4880.484132] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4880.628211] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4881.048444] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4881.188494] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4881.677043] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4881.824800] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4882.309097] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4882.453386] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4882.933380] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4883.081762] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4883.565664] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4883.714127] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4884.194298] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4884.334089] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4884.806299] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4884.950360] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4885.370581] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4885.518644] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4885.986912] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4886.130961] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4887.059415] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4887.203505] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4887.663851] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4887.807824] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4888.280026] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4888.424108] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4888.884659] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4889.464625] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4889.612696] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4890.076928] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4890.225019] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4891.753771] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4892.346101] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4892.494138] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4892.958372] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4893.106452] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4893.574696] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4893.722764] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4894.187012] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4894.775306] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4894.919343] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4896.452141] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4896.596190] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4897.064418] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4897.204523] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 4898.105102] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left
[ 4898.593258] WARNING: CPU: 3 PID: 0 at /home/lollixzc/Downloads/rtlwifi_new/tx.c:167 rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[ 4898.593260] Modules linked in: ccm rfcomm cmac algif_hash algif_skcipher af_alg bnep binfmt_misc nls_iso8859_1 hid_sensor_accel_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg hid_sensor_hub snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi btusb edac_mce_amd btrtl snd_seq_midi_event kvm_amd btbcm btintel kvm bluetooth uvcvideo input_leds hp_wmi videobuf2_vmalloc serio_raw wmi_bmof efi_pstore sparse_keymap hid_multitouch snd_rawmidi joydev k10temp videobuf2_memops rtw_8822be(OE) rtw_pci(OE) snd_seq rtw_8822b(OE) videobuf2_v4l2 sp5100_tco ecdh_generic rtw_core(OE) ecc videobuf2_common mac80211 snd_seq_device snd_timer cdc_ether videodev usbnet r8152 mc mii snd cfg80211 soundcore ccp ucsi_acpi typec_ucsi libarc4 typec hp_accel hp_wireless lis3lv02d amd_sfh_hid(OE) mac_hid amd_sfh_pci(OE) ip6t_REJECT nf_reject_ipv6 xt_hl ip6t_rt
[ 4898.593365] RIP: 0010:rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[ 4903.949055] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[ 4923.201523] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 5235.501207] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 5544.435625] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 5544.579595] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 5678.418332] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 5678.558251] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 5679.030142] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 5716.719324] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 5717.203222] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 8302.473212] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 8428.246767] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 8502.503657] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 8502.644093] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 8503.099619] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 8503.239591] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 8876.050241] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 8943.203382] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 9208.728995] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[ 9238.699046] rtw_8822be 0000:03:00.0: timed out to flush queue 2
[10331.923629] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[10414.975204] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[10429.035715] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[10429.175740] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[11014.047390] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[11014.187231] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[11014.647084] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[11018.455062] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[11018.603095] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[11307.946631] rtw_8822be 0000:03:00.0: failed to send h2c command
[11581.859572] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[11581.999566] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[11587.811333] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[11635.229636] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[11760.446034] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[11760.586000] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[11909.914812] rtw_8822be 0000:03:00.0: firmware failed to restore hardware setting
[12005.817161] rtw_8822be 0000:03:00.0: firmware failed to restore hardware setting
[12244.833638] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[13520.304114] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14188.089922] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14242.619910] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14556.128966] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14566.584818] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14590.056729] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14591.368583] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14637.156082] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14637.296090] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14637.752125] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14639.084058] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14647.783949] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14647.931932] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14652.047890] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14652.947864] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14653.099865] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14653.575871] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14653.715857] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14654.899856] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14655.391846] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14675.015590] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14699.383310] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14699.523268] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14699.987293] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14700.135260] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14702.339227] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14708.063158] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14712.415088] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14712.563100] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14721.026977] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14737.098780] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14753.786781] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14757.226456] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14757.374478] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14763.674382] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14764.174333] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14771.594239] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14797.045869] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14797.185911] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14802.650050] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14803.525748] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14803.665734] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14804.141718] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14805.137716] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14805.277717] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14805.765722] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14805.905702] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14918.859810] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14942.015356] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14952.563160] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14954.143139] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14980.994742] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[14981.478934] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[15003.606417] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[15051.997293] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[15067.872963] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[15068.012931] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[15070.101503] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left
[36270.815387] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[36679.742435] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left
[36680.242117] WARNING: CPU: 7 PID: 33373 at /home/lollixzc/Downloads/rtlwifi_new/tx.c:167 rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[36680.242118] Modules linked in: snd_usb_audio snd_usbmidi_lib rndis_host uas usb_storage ccm rfcomm cmac algif_hash algif_skcipher af_alg bnep binfmt_misc nls_iso8859_1 hid_sensor_accel_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg hid_sensor_hub snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi btusb edac_mce_amd btrtl snd_seq_midi_event kvm_amd btbcm btintel kvm bluetooth uvcvideo input_leds hp_wmi videobuf2_vmalloc serio_raw wmi_bmof efi_pstore sparse_keymap hid_multitouch snd_rawmidi joydev k10temp videobuf2_memops rtw_8822be(OE) rtw_pci(OE) snd_seq rtw_8822b(OE) videobuf2_v4l2 sp5100_tco ecdh_generic rtw_core(OE) ecc videobuf2_common mac80211 snd_seq_device snd_timer cdc_ether videodev usbnet r8152 mc mii snd cfg80211 soundcore ccp ucsi_acpi typec_ucsi libarc4 typec hp_accel hp_wireless lis3lv02d amd_sfh_hid(OE) mac_hid
[36680.242179] RIP: 0010:rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[36684.461562] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[36770.641109] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left
[36771.152465] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[37278.037440] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left
[37278.541352] WARNING: CPU: 7 PID: 0 at /home/lollixzc/Downloads/rtlwifi_new/tx.c:167 rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[37278.541355] Modules linked in: snd_usb_audio snd_usbmidi_lib rndis_host uas usb_storage ccm rfcomm cmac algif_hash algif_skcipher af_alg bnep binfmt_misc nls_iso8859_1 hid_sensor_accel_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg hid_sensor_hub snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi btusb edac_mce_amd btrtl snd_seq_midi_event kvm_amd btbcm btintel kvm bluetooth uvcvideo input_leds hp_wmi videobuf2_vmalloc serio_raw wmi_bmof efi_pstore sparse_keymap hid_multitouch snd_rawmidi joydev k10temp videobuf2_memops rtw_8822be(OE) rtw_pci(OE) snd_seq rtw_8822b(OE) videobuf2_v4l2 sp5100_tco ecdh_generic rtw_core(OE) ecc videobuf2_common mac80211 snd_seq_device snd_timer cdc_ether videodev usbnet r8152 mc mii snd cfg80211 soundcore ccp ucsi_acpi typec_ucsi libarc4 typec hp_accel hp_wireless lis3lv02d amd_sfh_hid(OE) mac_hid
[37278.541471] RIP: 0010:rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[37279.056850] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[37312.461138] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left
[37312.968883] WARNING: CPU: 7 PID: 0 at /home/lollixzc/Downloads/rtlwifi_new/tx.c:167 rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[37312.968884] Modules linked in: snd_usb_audio snd_usbmidi_lib rndis_host uas usb_storage ccm rfcomm cmac algif_hash algif_skcipher af_alg bnep binfmt_misc nls_iso8859_1 hid_sensor_accel_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg hid_sensor_hub snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi btusb edac_mce_amd btrtl snd_seq_midi_event kvm_amd btbcm btintel kvm bluetooth uvcvideo input_leds hp_wmi videobuf2_vmalloc serio_raw wmi_bmof efi_pstore sparse_keymap hid_multitouch snd_rawmidi joydev k10temp videobuf2_memops rtw_8822be(OE) rtw_pci(OE) snd_seq rtw_8822b(OE) videobuf2_v4l2 sp5100_tco ecdh_generic rtw_core(OE) ecc videobuf2_common mac80211 snd_seq_device snd_timer cdc_ether videodev usbnet r8152 mc mii snd cfg80211 soundcore ccp ucsi_acpi typec_ucsi libarc4 typec hp_accel hp_wireless lis3lv02d amd_sfh_hid(OE) mac_hid
[37312.968990] RIP: 0010:rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[37312.980322] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[37407.359401] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[37669.351613] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left
[37669.827856] WARNING: CPU: 7 PID: 0 at /home/lollixzc/Downloads/rtlwifi_new/tx.c:167 rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[37669.827858] Modules linked in: snd_usb_audio snd_usbmidi_lib rndis_host uas usb_storage ccm rfcomm cmac algif_hash algif_skcipher af_alg bnep binfmt_misc nls_iso8859_1 hid_sensor_accel_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg hid_sensor_hub snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi btusb edac_mce_amd btrtl snd_seq_midi_event kvm_amd btbcm btintel kvm bluetooth uvcvideo input_leds hp_wmi videobuf2_vmalloc serio_raw wmi_bmof efi_pstore sparse_keymap hid_multitouch snd_rawmidi joydev k10temp videobuf2_memops rtw_8822be(OE) rtw_pci(OE) snd_seq rtw_8822b(OE) videobuf2_v4l2 sp5100_tco ecdh_generic rtw_core(OE) ecc videobuf2_common mac80211 snd_seq_device snd_timer cdc_ether videodev usbnet r8152 mc mii snd cfg80211 soundcore ccp ucsi_acpi typec_ucsi libarc4 typec hp_accel hp_wireless lis3lv02d amd_sfh_hid(OE) mac_hid
[37669.827988] RIP: 0010:rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[37670.383009] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[37882.656543] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left
[37883.136401] WARNING: CPU: 6 PID: 0 at /home/lollixzc/Downloads/rtlwifi_new/tx.c:167 rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[37883.136402] Modules linked in: snd_usb_audio snd_usbmidi_lib rndis_host uas usb_storage ccm rfcomm cmac algif_hash algif_skcipher af_alg bnep binfmt_misc nls_iso8859_1 hid_sensor_accel_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg hid_sensor_hub snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi btusb edac_mce_amd btrtl snd_seq_midi_event kvm_amd btbcm btintel kvm bluetooth uvcvideo input_leds hp_wmi videobuf2_vmalloc serio_raw wmi_bmof efi_pstore sparse_keymap hid_multitouch snd_rawmidi joydev k10temp videobuf2_memops rtw_8822be(OE) rtw_pci(OE) snd_seq rtw_8822b(OE) videobuf2_v4l2 sp5100_tco ecdh_generic rtw_core(OE) ecc videobuf2_common mac80211 snd_seq_device snd_timer cdc_ether videodev usbnet r8152 mc mii snd cfg80211 soundcore ccp ucsi_acpi typec_ucsi libarc4 typec hp_accel hp_wireless lis3lv02d amd_sfh_hid(OE) mac_hid
[37883.136495] RIP: 0010:rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[37883.689856] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[37888.496285] rtw_8822be 0000:03:00.0: firmware failed to restore hardware setting
[38176.568104] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[38216.535531] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[38346.777658] rtw_8822be 0000:03:00.0: timed out to flush queue 2
[38393.556976] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[38749.644071] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left
[38750.132266] WARNING: CPU: 2 PID: 0 at /home/lollixzc/Downloads/rtlwifi_new/tx.c:167 rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[38750.132270] Modules linked in: snd_usb_audio snd_usbmidi_lib rndis_host uas usb_storage ccm rfcomm cmac algif_hash algif_skcipher af_alg bnep binfmt_misc nls_iso8859_1 hid_sensor_accel_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg hid_sensor_hub snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi btusb edac_mce_amd btrtl snd_seq_midi_event kvm_amd btbcm btintel kvm bluetooth uvcvideo input_leds hp_wmi videobuf2_vmalloc serio_raw wmi_bmof efi_pstore sparse_keymap hid_multitouch snd_rawmidi joydev k10temp videobuf2_memops rtw_8822be(OE) rtw_pci(OE) snd_seq rtw_8822b(OE) videobuf2_v4l2 sp5100_tco ecdh_generic rtw_core(OE) ecc videobuf2_common mac80211 snd_seq_device snd_timer cdc_ether videodev usbnet r8152 mc mii snd cfg80211 soundcore ccp ucsi_acpi typec_ucsi libarc4 typec hp_accel hp_wireless lis3lv02d amd_sfh_hid(OE) mac_hid
[38750.132393] RIP: 0010:rtw_tx_report_purge_timer+0x25/0x60 [rtw_core]
[38750.183235] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 joined with macid 0
[39078.899203] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39079.051201] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39133.474799] rtw_8822be 0000:03:00.0: firmware failed to restore hardware setting
[39241.481546] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39377.272029] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39398.339844] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39421.491486] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39499.978591] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39500.118796] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39523.166284] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39786.411035] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39788.355014] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39847.410258] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39848.214281] rtw_8822be 0000:03:00.0: timed out to flush queue 1
[39874.100058] rtw_8822be 0000:03:00.0: sta 9c:97:26:b8:a0:b3 with macid 0 left

^ permalink raw reply

* pull-request: mac80211 2020-06-08
From: Johannes Berg @ 2020-06-08  8:08 UTC (permalink / raw)
  To: netdev; +Cc: linux-wireless

Hi Dave,

We have a couple of updates - most importantly the fix
for the deadlock issue that came up.

Please pull and let me know if there's any problem.

Thanks,
johannes



The following changes since commit 98749b7188affbf2900c2aab704a8853901d1139:

  yam: fix possible memory leak in yam_init_driver (2020-06-04 15:58:41 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git tags/mac80211-for-davem-2020-06-08

for you to fetch changes up to 59d4bfc1e2c09435d91c980b03f7b72ce6e9f24e:

  net: fix wiki website url mac80211 and wireless files (2020-06-08 10:06:05 +0200)

----------------------------------------------------------------
Just a small update:
 * fix the deadlock on rfkill/wireless removal that a few
   people reported
 * fix an uninitialized variable
 * update wiki URLs

----------------------------------------------------------------
Flavio Suligoi (3):
      doc: networking: wireless: fix wiki website url
      include: fix wiki website url in netlink interface header
      net: fix wiki website url mac80211 and wireless files

Johannes Berg (2):
      cfg80211: fix management registrations deadlock
      mac80211: initialize return flags in HE 6 GHz operation parsing

 Documentation/networking/mac80211-injection.rst |  2 +-
 Documentation/networking/regulatory.rst         |  6 +++---
 include/net/cfg80211.h                          |  5 +++--
 include/uapi/linux/nl80211.h                    |  2 +-
 net/mac80211/mlme.c                             |  2 ++
 net/mac80211/rx.c                               |  2 +-
 net/wireless/Kconfig                            |  2 +-
 net/wireless/core.c                             |  6 +++---
 net/wireless/core.h                             |  2 ++
 net/wireless/mlme.c                             | 26 ++++++++++++++++++++-----
 10 files changed, 38 insertions(+), 17 deletions(-)


^ permalink raw reply

* Re: [PATCH v5 0/8] add 6GHz radio support in ath11k driver
From: Kalle Valo @ 2020-06-08 11:04 UTC (permalink / raw)
  To: Pradeep Kumar Chitrapu; +Cc: linux-wireless, ath11k
In-Reply-To: <97dabee94c4faecbc83bbd02baf3a798@codeaurora.org>

Pradeep Kumar Chitrapu <pradeepc@codeaurora.org> writes:

> On 2020-06-03 06:12, Kalle Valo wrote:
>> Pradeep Kumar Chitrapu <pradeepc@codeaurora.org> writes:
>>
>>> This patch series adds 6GHz frequency listing in ath11k driver and
>>> mac80211
>>> registration for the 6GHz band. Also, extends some of wmi command
>>> tlvs for
>>> supporting 6GHz.
>>>
>>> changes in v5:
>>>  - latest 6ghz patches on mac80211 expects driver not to pass ht/vht
>>>    caps for 6GHZ band at device registration. so fix that.
>>
>> What are the dependencies for this patch? Is everything that is in
>> mac80211-next as of today enough?
>
> Yes Kalle. current mac80211-next is enough.
>
>>
>> Also what I do with Rajkumar's patch:
>>
>> [PATCH] ath11k: build HE 6 GHz capability
>>
>> Should I apply it before or after this patchset?
>
> Although there is no compile dependency with above patchset, there
> will be 6ghz functionality dependency with above. So, IMO, its better
> to apply after this patch set.

Ok, thanks.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply

* Re: [PATCH 12/12] ath11k: set the multiple bssid hw cap
From: Kalle Valo @ 2020-06-08 11:09 UTC (permalink / raw)
  To: John Crispin; +Cc: Johannes Berg, linux-wireless, ath11k
In-Reply-To: <20200604070952.15481-13-john@phrozen.org>

John Crispin <john@phrozen.org> writes:

> This patch sets the SUPPORTS_MULTI_BSSID inside ath11k.
>
> Signed-off-by: John Crispin <john@phrozen.org>

On what hardware and firmware did you test this?

> --- a/drivers/net/wireless/ath/ath11k/wmi.h
> +++ b/drivers/net/wireless/ath/ath11k/wmi.h
> @@ -109,8 +109,8 @@ enum {
>  
>  enum {
>  	WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP	= 1,
> -	WMI_HOST_VDEV_FLAGS_TRANSMIT_AP		= 2,
> -	WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP	= 4,
> +	WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP	= 2,
> +	WMI_HOST_VDEV_FLAGS_TRANSMIT_AP		= 4,

I wonder if this is a safe thing to do? Do all firmware branches use
these new values?

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply

* Re: [PATCH] ath10k: Move msa region map/unmap to init/deinit path
From: Kalle Valo @ 2020-06-08 11:18 UTC (permalink / raw)
  To: Govind Singh; +Cc: ath10k, linux-wireless, Govind Singh
In-Reply-To: <1591191231-31917-1-git-send-email-govinds@codeaurora.org>

Govind Singh <govinds@codeaurora.org> wrote:

> With kernel qrtr switch from user space qrtr, fw crash is seen
> during reboot. During reboot modem rproc shutdown causes wlan qmi
> service exit and msa region gets unmapped. Since pdev is not suspended
> hw still accessing the msa region and this results in  fw crash as
> msa region is unmapped.
> 
> Decouple msa mapping from wlan qmi server arrive/exit to init/deinit
> path.
> 
> Testing is pending with "0c2204a4ad71 net: qrtr: Migrate nameservice
> to kernel from userspace", only regression sanity performed with user space
> qrtr on QCS404/SC7180.
> 
> Fixes: 0c2204a4ad71 net: qrtr: Migrate nameservice to kernel from userspace
> Signed-off-by: Govind Singh <govinds@codeaurora.org>

Dropped as requested

Patch set to Changes Requested.

-- 
https://patchwork.kernel.org/patch/11585699/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply

* Re: [PATCH 12/12] ath11k: set the multiple bssid hw cap
From: John Crispin @ 2020-06-08 11:29 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Johannes Berg, linux-wireless, ath11k
In-Reply-To: <87ftb5ke5d.fsf@codeaurora.org>

On 08.06.20 13:09, Kalle Valo wrote:
> John Crispin <john@phrozen.org> writes:
> 
>> This patch sets the SUPPORTS_MULTI_BSSID inside ath11k.
>>
>> Signed-off-by: John Crispin <john@phrozen.org>
> 
> On what hardware and firmware did you test this?
> 
>> --- a/drivers/net/wireless/ath/ath11k/wmi.h
>> +++ b/drivers/net/wireless/ath/ath11k/wmi.h
>> @@ -109,8 +109,8 @@ enum {
>>   
>>   enum {
>>   	WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP	= 1,
>> -	WMI_HOST_VDEV_FLAGS_TRANSMIT_AP		= 2,
>> -	WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP	= 4,
>> +	WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP	= 2,
>> +	WMI_HOST_VDEV_FLAGS_TRANSMIT_AP		= 4,
> 
> I wonder if this is a safe thing to do? Do all firmware branches use
> these new values?
> 

Hi,
looks like i folded the fix patch into the wrong patch. these values get 
added in this same patchset. Johannes commented on the nl80211 part 
already and i will send out a V2 this week.
	John

^ permalink raw reply

* Re: [PATCH] ath10k: Acquire tx_lock in tx error paths
From: Kalle Valo @ 2020-06-08 11:38 UTC (permalink / raw)
  To: Evan Green
  Cc: Govind Singh, kuabhs, sujitka, netdev, linux-wireless,
	linux-kernel, ath10k, Michal Kazior, Jakub Kicinski,
	David S. Miller
In-Reply-To: <20200604105901.1.I5b8b0c7ee0d3e51a73248975a9da61401b8f3900@changeid>

Evan Green <evgreen@chromium.org> writes:

> ath10k_htt_tx_free_msdu_id() has a lockdep assertion that htt->tx_lock
> is held. Acquire the lock in a couple of error paths when calling that
> function to ensure this condition is met.
>
> Fixes: 6421969f248fd ("ath10k: refactor tx pending management")
> Fixes: e62ee5c381c59 ("ath10k: Add support for htt_data_tx_desc_64
> descriptor")

Fixes tag should be in one line, I fixed that in the pending branch.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply

* Re: [PATCH v5 1/8] ath11k: add 6G frequency list supported by driver
From: Kalle Valo @ 2020-06-08 15:41 UTC (permalink / raw)
  To: Pradeep Kumar Chitrapu; +Cc: ath11k, linux-wireless, Pradeep Kumar Chitrapu
In-Reply-To: <20200603001724.12161-2-pradeepc@codeaurora.org>

Pradeep Kumar Chitrapu <pradeepc@codeaurora.org> wrote:

> This patch adds support for 6GHz frequency listing.
> 
> Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

This patchset had new warnings which I fixed in the pending branch:

drivers/net/wireless/ath/ath11k/dp_rx.c:2178: braces {} should be used on all arms of this statement
drivers/net/wireless/ath/ath11k/mac.c:3749: Blank lines aren't necessary before a close brace '}'
drivers/net/wireless/ath/ath11k/mac.c:4197: Blank lines aren't necessary before a close brace '}'

-- 
https://patchwork.kernel.org/patch/11584701/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply

* Re: [PATCH] ath10k: Acquire tx_lock in tx error paths
From: Evan Green @ 2020-06-08 16:07 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Govind Singh, sujitka, netdev, linux-wireless, LKML, ath10k,
	Michal Kazior, Jakub Kicinski, David S. Miller, kuabhs
In-Reply-To: <87v9k1iy7w.fsf@codeaurora.org>

On Mon, Jun 8, 2020 at 4:39 AM Kalle Valo <kvalo@codeaurora.org> wrote:
>
> Evan Green <evgreen@chromium.org> writes:
>
> > ath10k_htt_tx_free_msdu_id() has a lockdep assertion that htt->tx_lock
> > is held. Acquire the lock in a couple of error paths when calling that
> > function to ensure this condition is met.
> >
> > Fixes: 6421969f248fd ("ath10k: refactor tx pending management")
> > Fixes: e62ee5c381c59 ("ath10k: Add support for htt_data_tx_desc_64
> > descriptor")
>
> Fixes tag should be in one line, I fixed that in the pending branch.

Ah, got it. Thanks Kalle!
-Evan

^ permalink raw reply

* [mac80211:master] BUILD SUCCESS 59d4bfc1e2c09435d91c980b03f7b72ce6e9f24e
From: kernel test robot @ 2020-06-08 16:09 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git  master
branch HEAD: 59d4bfc1e2c09435d91c980b03f7b72ce6e9f24e  net: fix wiki website url mac80211 and wireless files

elapsed time: 481m

configs tested: 162
configs skipped: 13

The following configs have been built successfully.
More configs may be tested in the coming days.

arm                                 defconfig
arm                              allyesconfig
arm                              allmodconfig
arm                               allnoconfig
arm64                            allyesconfig
arm64                               defconfig
arm64                            allmodconfig
arm64                             allnoconfig
m68k                         amcore_defconfig
mips                       rbtx49xx_defconfig
um                                  defconfig
sh                     magicpanelr2_defconfig
powerpc                      ep88xc_defconfig
sh                ecovec24-romimage_defconfig
sparc64                          allmodconfig
arm                           h3600_defconfig
sparc                            allyesconfig
powerpc                    mvme5100_defconfig
openrisc                 simple_smp_defconfig
sh                           se7705_defconfig
mips                     decstation_defconfig
c6x                        evmc6678_defconfig
arc                 nsimosci_hs_smp_defconfig
arm                        mvebu_v5_defconfig
arm                          iop32x_defconfig
arm                            mps2_defconfig
openrisc                         allyesconfig
mips                  cavium_octeon_defconfig
nds32                               defconfig
sparc64                             defconfig
sh                           se7343_defconfig
mips                         tb0226_defconfig
h8300                    h8300h-sim_defconfig
arc                          axs101_defconfig
sh                           se7724_defconfig
arm                       aspeed_g5_defconfig
mips                           xway_defconfig
arm                            dove_defconfig
xtensa                           alldefconfig
arm                         shannon_defconfig
arm                         socfpga_defconfig
sh                   sh7724_generic_defconfig
um                                allnoconfig
arc                                 defconfig
powerpc                    amigaone_defconfig
arc                        nsim_700_defconfig
arm                          exynos_defconfig
arc                            hsdk_defconfig
m68k                          sun3x_defconfig
m68k                        m5272c3_defconfig
m68k                        stmark2_defconfig
arm                            qcom_defconfig
sh                             espt_defconfig
powerpc                          allmodconfig
powerpc                     mpc512x_defconfig
i386                              allnoconfig
arm                     davinci_all_defconfig
mips                  maltasmvp_eva_defconfig
arm                            xcep_defconfig
arm                         mv78xx0_defconfig
c6x                        evmc6457_defconfig
m68k                        mvme16x_defconfig
s390                             allmodconfig
ia64                      gensparse_defconfig
arm                            zeus_defconfig
sh                           se7206_defconfig
sh                          rsk7203_defconfig
sh                          polaris_defconfig
arm                       omap2plus_defconfig
i386                             alldefconfig
parisc                generic-32bit_defconfig
arm                          ep93xx_defconfig
i386                             allyesconfig
i386                                defconfig
i386                              debian-10.3
ia64                             allmodconfig
ia64                                defconfig
ia64                              allnoconfig
ia64                             allyesconfig
m68k                             allmodconfig
m68k                              allnoconfig
m68k                           sun3_defconfig
m68k                                defconfig
m68k                             allyesconfig
nios2                               defconfig
nios2                            allyesconfig
openrisc                            defconfig
c6x                              allyesconfig
c6x                               allnoconfig
nds32                             allnoconfig
csky                             allyesconfig
csky                                defconfig
alpha                               defconfig
alpha                            allyesconfig
xtensa                           allyesconfig
h8300                            allyesconfig
h8300                            allmodconfig
xtensa                              defconfig
arc                              allyesconfig
sh                               allmodconfig
sh                                allnoconfig
microblaze                        allnoconfig
mips                             allyesconfig
mips                              allnoconfig
mips                             allmodconfig
parisc                            allnoconfig
parisc                              defconfig
parisc                           allyesconfig
parisc                           allmodconfig
powerpc                             defconfig
powerpc                          allyesconfig
powerpc                          rhel-kconfig
powerpc                           allnoconfig
i386                 randconfig-a001-20200607
i386                 randconfig-a006-20200607
i386                 randconfig-a002-20200607
i386                 randconfig-a005-20200607
i386                 randconfig-a004-20200607
i386                 randconfig-a003-20200607
x86_64               randconfig-a011-20200608
x86_64               randconfig-a016-20200608
x86_64               randconfig-a012-20200608
x86_64               randconfig-a014-20200608
x86_64               randconfig-a013-20200608
x86_64               randconfig-a015-20200608
i386                 randconfig-a014-20200608
i386                 randconfig-a011-20200608
i386                 randconfig-a015-20200608
i386                 randconfig-a016-20200608
i386                 randconfig-a012-20200608
i386                 randconfig-a013-20200608
i386                 randconfig-a014-20200607
i386                 randconfig-a015-20200607
i386                 randconfig-a011-20200607
i386                 randconfig-a016-20200607
i386                 randconfig-a012-20200607
i386                 randconfig-a013-20200607
x86_64               randconfig-a002-20200607
x86_64               randconfig-a001-20200607
x86_64               randconfig-a006-20200607
x86_64               randconfig-a003-20200607
x86_64               randconfig-a004-20200607
x86_64               randconfig-a005-20200607
riscv                            allyesconfig
riscv                             allnoconfig
riscv                               defconfig
riscv                            allmodconfig
s390                             allyesconfig
s390                              allnoconfig
s390                                defconfig
sparc                               defconfig
sparc64                           allnoconfig
sparc64                          allyesconfig
um                               allmodconfig
um                               allyesconfig
x86_64                                   rhel
x86_64                               rhel-7.6
x86_64                    rhel-7.6-kselftests
x86_64                         rhel-7.2-clear
x86_64                                    lkp
x86_64                              fedora-25
x86_64                                  kexec

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply

* Re: [PATCH v2 5/5] rtw88: 8821c: Add 8821CE to Kconfig and Makefile
From: Larry Finger @ 2020-06-08 19:01 UTC (permalink / raw)
  To: yhchuang, kvalo; +Cc: linux-wireless, tehuang, bigeasy
In-Reply-To: <20200603094218.19942-6-yhchuang@realtek.com>

On 6/3/20 4:42 AM, yhchuang@realtek.com wrote:
> From: Tzu-En Huang <tehuang@realtek.com>
> 
> Since 8821C code is ready, we can build it.
> 
> Signed-off-by: Tzu-En Huang <tehuang@realtek.com>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>

I added this code to the rtw88 GitHub repository that I maintain. I do not have 
an 8821CE card and have no way to test it; however, there is at least one user.

That user has built the driver and gets the firmware loaded, but runs into the 
following:

[   12.378158] rtw_8821ce 0000:02:00.0: Firmware version 24.5.0, H2C version 12
[   12.404834] rtw_8821ce 0000:02:00.0: rfe 2 isn't supported
[   12.404937] rtw_8821ce 0000:02:00.0: failed to setup chip efuse info
[   12.404939] rtw_8821ce 0000:02:00.0: failed to setup chip information

Any help would be appreciated.

Thanks,

Larry



^ permalink raw reply

* [PATCH AUTOSEL 5.7 162/274] ath11k: fix kernel panic by freeing the msdu received with invalid length
From: Sasha Levin @ 2020-06-08 23:04 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Tamizh Chelvam, Kalle Valo, Sasha Levin, ath11k, linux-wireless,
	netdev
In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org>

From: Tamizh Chelvam <tamizhr@codeaurora.org>

[ Upstream commit d7d43782d541edb8596d2f4fc7f41b0734948ec5 ]

In certain scenario host receives the packets with invalid length
which causes below kernel panic. Free up those msdus to avoid
this kernel panic.

 2270.028121:   <6> task: ffffffc0008306d0 ti: ffffffc0008306d0 task.ti: ffffffc0008306d0
 2270.035247:   <2> PC is at skb_panic+0x40/0x44
 2270.042784:   <2> LR is at skb_panic+0x40/0x44
 2270.521775:   <2> [<ffffffc0004a06e0>] skb_panic+0x40/0x44
 2270.524039:   <2> [<ffffffc0004a1278>] skb_put+0x54/0x5c
 2270.529264:   <2> [<ffffffbffcc373a8>] ath11k_dp_process_rx_err+0x320/0x5b0 [ath11k]
 2270.533860:   <2> [<ffffffbffcc30b68>] ath11k_dp_service_srng+0x80/0x268 [ath11k]
 2270.541063:   <2> [<ffffffbffcc1d554>] ath11k_hal_rx_reo_ent_buf_paddr_get+0x200/0xb64 [ath11k]
 2270.547917:   <2> [<ffffffc0004b1f74>] net_rx_action+0xf8/0x274
 2270.556247:   <2> [<ffffffc000099df4>] __do_softirq+0x128/0x228
 2270.561625:   <2> [<ffffffc00009a130>] irq_exit+0x84/0xcc
 2270.567008:   <2> [<ffffffc0000cfb28>] __handle_domain_irq+0x8c/0xb0
 2270.571695:   <2> [<ffffffc000082484>] gic_handle_irq+0x6c/0xbc

Signed-off-by: Tamizh Chelvam <tamizhr@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1588611568-20791-1-git-send-email-tamizhr@codeaurora.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath11k/dp_rx.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index 34b1e8e6a7fb..007bb73d6c61 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -2265,6 +2265,7 @@ static int ath11k_dp_rx_process_msdu(struct ath11k *ar,
 	struct ieee80211_hdr *hdr;
 	struct sk_buff *last_buf;
 	u8 l3_pad_bytes;
+	u8 *hdr_status;
 	u16 msdu_len;
 	int ret;
 
@@ -2293,8 +2294,13 @@ static int ath11k_dp_rx_process_msdu(struct ath11k *ar,
 		skb_pull(msdu, HAL_RX_DESC_SIZE);
 	} else if (!rxcb->is_continuation) {
 		if ((msdu_len + HAL_RX_DESC_SIZE) > DP_RX_BUFFER_SIZE) {
+			hdr_status = ath11k_dp_rx_h_80211_hdr(rx_desc);
 			ret = -EINVAL;
 			ath11k_warn(ar->ab, "invalid msdu len %u\n", msdu_len);
+			ath11k_dbg_dump(ar->ab, ATH11K_DBG_DATA, NULL, "", hdr_status,
+					sizeof(struct ieee80211_hdr));
+			ath11k_dbg_dump(ar->ab, ATH11K_DBG_DATA, NULL, "", rx_desc,
+					sizeof(struct hal_rx_desc));
 			goto free_out;
 		}
 		skb_put(msdu, HAL_RX_DESC_SIZE + l3_pad_bytes + msdu_len);
@@ -3389,6 +3395,7 @@ ath11k_dp_process_rx_err_buf(struct ath11k *ar, u32 *ring_desc, int buf_id, bool
 	struct sk_buff *msdu;
 	struct ath11k_skb_rxcb *rxcb;
 	struct hal_rx_desc *rx_desc;
+	u8 *hdr_status;
 	u16 msdu_len;
 
 	spin_lock_bh(&rx_ring->idr_lock);
@@ -3426,6 +3433,17 @@ ath11k_dp_process_rx_err_buf(struct ath11k *ar, u32 *ring_desc, int buf_id, bool
 
 	rx_desc = (struct hal_rx_desc *)msdu->data;
 	msdu_len = ath11k_dp_rx_h_msdu_start_msdu_len(rx_desc);
+	if ((msdu_len + HAL_RX_DESC_SIZE) > DP_RX_BUFFER_SIZE) {
+		hdr_status = ath11k_dp_rx_h_80211_hdr(rx_desc);
+		ath11k_warn(ar->ab, "invalid msdu leng %u", msdu_len);
+		ath11k_dbg_dump(ar->ab, ATH11K_DBG_DATA, NULL, "", hdr_status,
+				sizeof(struct ieee80211_hdr));
+		ath11k_dbg_dump(ar->ab, ATH11K_DBG_DATA, NULL, "", rx_desc,
+				sizeof(struct hal_rx_desc));
+		dev_kfree_skb_any(msdu);
+		goto exit;
+	}
+
 	skb_put(msdu, HAL_RX_DESC_SIZE + msdu_len);
 
 	if (ath11k_dp_rx_frag_h_mpdu(ar, msdu, ring_desc)) {
-- 
2.25.1


^ permalink raw reply related

* [PATCH AUTOSEL 5.7 179/274] iwlwifi: avoid debug max amsdu config overwriting itself
From: Sasha Levin @ 2020-06-08 23:04 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Mordechay Goodstein, Luca Coelho, Sasha Levin, linux-wireless,
	netdev
In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org>

From: Mordechay Goodstein <mordechay.goodstein@intel.com>

[ Upstream commit a65a5824298b06049dbaceb8a9bd19709dc9507c ]

If we set amsdu_len one after another the second one overwrites
the orig_amsdu_len so allow only moving from debug to non debug state.

Also the TLC update check was wrong: it was checking that also the orig
is smaller then the new updated size, which is not the case in debug
amsdu mode.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Fixes: af2984e9e625 ("iwlwifi: mvm: add a debugfs entry to set a fixed size AMSDU for all TX packets")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200424182644.e565446a4fce.I9729d8c520d8b8bb4de9a5cdc62e01eb85168aac@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 11 +++++++----
 drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c   | 15 ++++++++-------
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index 3beef8d077b8..8fae7e707374 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -5,10 +5,9 @@
  *
  * GPL LICENSE SUMMARY
  *
- * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
  * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
- * Copyright(c) 2018 - 2019 Intel Corporation
+ * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -28,10 +27,9 @@
  *
  * BSD LICENSE
  *
- * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
  * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
- * Copyright(c) 2018 - 2019 Intel Corporation
+ * Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -481,6 +479,11 @@ static ssize_t iwl_dbgfs_amsdu_len_write(struct ieee80211_sta *sta,
 	if (kstrtou16(buf, 0, &amsdu_len))
 		return -EINVAL;
 
+	/* only change from debug set <-> debug unset */
+	if ((amsdu_len && mvmsta->orig_amsdu_len) ||
+	    (!!amsdu_len && mvmsta->orig_amsdu_len))
+		return -EBUSY;
+
 	if (amsdu_len) {
 		mvmsta->orig_amsdu_len = sta->max_amsdu_len;
 		sta->max_amsdu_len = amsdu_len;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
index 15d11fb72aca..6f4d241d47e9 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
@@ -369,14 +369,15 @@ void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm,
 		u16 size = le32_to_cpu(notif->amsdu_size);
 		int i;
 
-		/*
-		 * In debug sta->max_amsdu_len < size
-		 * so also check with orig_amsdu_len which holds the original
-		 * data before debugfs changed the value
-		 */
-		if (WARN_ON(sta->max_amsdu_len < size &&
-			    mvmsta->orig_amsdu_len < size))
+		if (sta->max_amsdu_len < size) {
+			/*
+			 * In debug sta->max_amsdu_len < size
+			 * so also check with orig_amsdu_len which holds the
+			 * original data before debugfs changed the value
+			 */
+			WARN_ON(mvmsta->orig_amsdu_len < size);
 			goto out;
+		}
 
 		mvmsta->amsdu_enabled = le32_to_cpu(notif->amsdu_enabled);
 		mvmsta->max_amsdu_len = size;
-- 
2.25.1


^ permalink raw reply related

* [PATCH AUTOSEL 5.7 185/274] ath10k: Remove msdu from idr when management pkt send fails
From: Sasha Levin @ 2020-06-08 23:04 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Rakesh Pillai, Kalle Valo, Sasha Levin, ath10k, linux-wireless,
	netdev
In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org>

From: Rakesh Pillai <pillair@codeaurora.org>

[ Upstream commit c730c477176ad4af86d9aae4d360a7ad840b073a ]

Currently when the sending of any management pkt
via wmi command fails, the packet is being unmapped
freed in the error handling. But the idr entry added,
which is used to track these packet is not getting removed.

Hence, during unload, in wmi cleanup, all the entries
in IDR are removed and the corresponding buffer is
attempted to be freed. This can cause a situation where
one packet is attempted to be freed twice.

Fix this error by rmeoving the msdu from the idr
list when the sending of a management packet over
wmi fails.

Tested HW: WCN3990
Tested FW: WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1

Fixes: 1807da49733e ("ath10k: wmi: add management tx by reference support over wmi")
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1588667015-25490-1-git-send-email-pillair@codeaurora.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath10k/mac.c     |  3 +++
 drivers/net/wireless/ath/ath10k/wmi-ops.h | 10 ++++++++++
 drivers/net/wireless/ath/ath10k/wmi-tlv.c | 15 +++++++++++++++
 3 files changed, 28 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 70331ca9e50e..7b60d8d6bfa9 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3921,6 +3921,9 @@ void ath10k_mgmt_over_wmi_tx_work(struct work_struct *work)
 			if (ret) {
 				ath10k_warn(ar, "failed to transmit management frame by ref via WMI: %d\n",
 					    ret);
+				/* remove this msdu from idr tracking */
+				ath10k_wmi_cleanup_mgmt_tx_send(ar, skb);
+
 				dma_unmap_single(ar->dev, paddr, skb->len,
 						 DMA_TO_DEVICE);
 				ieee80211_free_txskb(ar->hw, skb);
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
index 1491c25518bb..edccabc667e8 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
@@ -133,6 +133,7 @@ struct wmi_ops {
 	struct sk_buff *(*gen_mgmt_tx_send)(struct ath10k *ar,
 					    struct sk_buff *skb,
 					    dma_addr_t paddr);
+	int (*cleanup_mgmt_tx_send)(struct ath10k *ar, struct sk_buff *msdu);
 	struct sk_buff *(*gen_dbglog_cfg)(struct ath10k *ar, u64 module_enable,
 					  u32 log_level);
 	struct sk_buff *(*gen_pktlog_enable)(struct ath10k *ar, u32 filter);
@@ -441,6 +442,15 @@ ath10k_wmi_get_txbf_conf_scheme(struct ath10k *ar)
 	return ar->wmi.ops->get_txbf_conf_scheme(ar);
 }
 
+static inline int
+ath10k_wmi_cleanup_mgmt_tx_send(struct ath10k *ar, struct sk_buff *msdu)
+{
+	if (!ar->wmi.ops->cleanup_mgmt_tx_send)
+		return -EOPNOTSUPP;
+
+	return ar->wmi.ops->cleanup_mgmt_tx_send(ar, msdu);
+}
+
 static inline int
 ath10k_wmi_mgmt_tx_send(struct ath10k *ar, struct sk_buff *msdu,
 			dma_addr_t paddr)
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index 4e68debda9bf..4a3e169965ae 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -2897,6 +2897,18 @@ ath10k_wmi_tlv_op_gen_request_stats(struct ath10k *ar, u32 stats_mask)
 	return skb;
 }
 
+static int
+ath10k_wmi_tlv_op_cleanup_mgmt_tx_send(struct ath10k *ar,
+				       struct sk_buff *msdu)
+{
+	struct ath10k_skb_cb *cb = ATH10K_SKB_CB(msdu);
+	struct ath10k_wmi *wmi = &ar->wmi;
+
+	idr_remove(&wmi->mgmt_pending_tx, cb->msdu_id);
+
+	return 0;
+}
+
 static int
 ath10k_wmi_mgmt_tx_alloc_msdu_id(struct ath10k *ar, struct sk_buff *skb,
 				 dma_addr_t paddr)
@@ -2971,6 +2983,8 @@ ath10k_wmi_tlv_op_gen_mgmt_tx_send(struct ath10k *ar, struct sk_buff *msdu,
 	if (desc_id < 0)
 		goto err_free_skb;
 
+	cb->msdu_id = desc_id;
+
 	ptr = (void *)skb->data;
 	tlv = ptr;
 	tlv->tag = __cpu_to_le16(WMI_TLV_TAG_STRUCT_MGMT_TX_CMD);
@@ -4419,6 +4433,7 @@ static const struct wmi_ops wmi_tlv_ops = {
 	.gen_force_fw_hang = ath10k_wmi_tlv_op_gen_force_fw_hang,
 	/* .gen_mgmt_tx = not implemented; HTT is used */
 	.gen_mgmt_tx_send = ath10k_wmi_tlv_op_gen_mgmt_tx_send,
+	.cleanup_mgmt_tx_send = ath10k_wmi_tlv_op_cleanup_mgmt_tx_send,
 	.gen_dbglog_cfg = ath10k_wmi_tlv_op_gen_dbglog_cfg,
 	.gen_pktlog_enable = ath10k_wmi_tlv_op_gen_pktlog_enable,
 	.gen_pktlog_disable = ath10k_wmi_tlv_op_gen_pktlog_disable,
-- 
2.25.1


^ permalink raw reply related

* [PATCH AUTOSEL 5.7 190/274] mt76: mt7663: fix mt7615_mac_cca_stats_reset routine
From: Sasha Levin @ 2020-06-08 23:04 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Lorenzo Bianconi, Felix Fietkau, Sasha Levin, linux-wireless,
	netdev, linux-arm-kernel, linux-mediatek
In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org>

From: Lorenzo Bianconi <lorenzo@kernel.org>

[ Upstream commit 886a862d3677ac0d3b57d19ffcf5b2d48b9c5267 ]

Fix PHYMUX_5 register definition for mt7663 in
mt7615_mac_cca_stats_reset routine

Fixes: f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mac.c  | 8 +++++++-
 drivers/net/wireless/mediatek/mt76/mt7615/regs.h | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
index a27a6d164009..656231786d55 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
@@ -1574,8 +1574,14 @@ void mt7615_mac_cca_stats_reset(struct mt7615_phy *phy)
 {
 	struct mt7615_dev *dev = phy->dev;
 	bool ext_phy = phy != &dev->phy;
-	u32 reg = MT_WF_PHY_R0_PHYMUX_5(ext_phy);
+	u32 reg;
 
+	if (is_mt7663(&dev->mt76))
+		reg = MT7663_WF_PHY_R0_PHYMUX_5;
+	else
+		reg = MT_WF_PHY_R0_PHYMUX_5(ext_phy);
+
+	/* reset PD and MDRDY counters */
 	mt76_clear(dev, reg, GENMASK(22, 20));
 	mt76_set(dev, reg, BIT(22) | BIT(20));
 }
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/regs.h b/drivers/net/wireless/mediatek/mt76/mt7615/regs.h
index 1e0d95b917e1..f7c2a633841c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/regs.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/regs.h
@@ -151,6 +151,7 @@ enum mt7615_reg_base {
 #define MT_WF_PHY_WF2_RFCTRL0_LPBCN_EN	BIT(9)
 
 #define MT_WF_PHY_R0_PHYMUX_5(_phy)	MT_WF_PHY(0x0614 + ((_phy) << 9))
+#define MT7663_WF_PHY_R0_PHYMUX_5	MT_WF_PHY(0x0414)
 
 #define MT_WF_PHY_R0_PHYCTRL_STS0(_phy)	MT_WF_PHY(0x020c + ((_phy) << 9))
 #define MT_WF_PHYCTRL_STAT_PD_OFDM	GENMASK(31, 16)
-- 
2.25.1


^ permalink raw reply related

* [PATCH AUTOSEL 5.7 210/274] rtlwifi: Fix a double free in _rtl_usb_tx_urb_setup()
From: Sasha Levin @ 2020-06-08 23:05 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Dan Carpenter, Kalle Valo, Sasha Levin, linux-wireless, netdev
In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org>

From: Dan Carpenter <dan.carpenter@oracle.com>

[ Upstream commit beb12813bc75d4a23de43b85ad1c7cb28d27631e ]

Seven years ago we tried to fix a leak but actually introduced a double
free instead.  It was an understandable mistake because the code was a
bit confusing and the free was done in the wrong place.  The "skb"
pointer is freed in both _rtl_usb_tx_urb_setup() and _rtl_usb_transmit().
The free belongs _rtl_usb_transmit() instead of _rtl_usb_tx_urb_setup()
and I've cleaned the code up a bit to hopefully make it more clear.

Fixes: 36ef0b473fbf ("rtlwifi: usb: add missing freeing of skbuff")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200513093951.GD347693@mwanda
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/realtek/rtlwifi/usb.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c
index 348b0072cdd6..c66c6dc00378 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
@@ -881,10 +881,8 @@ static struct urb *_rtl_usb_tx_urb_setup(struct ieee80211_hw *hw,
 
 	WARN_ON(NULL == skb);
 	_urb = usb_alloc_urb(0, GFP_ATOMIC);
-	if (!_urb) {
-		kfree_skb(skb);
+	if (!_urb)
 		return NULL;
-	}
 	_rtl_install_trx_info(rtlusb, skb, ep_num);
 	usb_fill_bulk_urb(_urb, rtlusb->udev, usb_sndbulkpipe(rtlusb->udev,
 			  ep_num), skb->data, skb->len, _rtl_tx_complete, skb);
@@ -898,7 +896,6 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
 	struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
 	u32 ep_num;
 	struct urb *_urb = NULL;
-	struct sk_buff *_skb = NULL;
 
 	WARN_ON(NULL == rtlusb->usb_tx_aggregate_hdl);
 	if (unlikely(IS_USB_STOP(rtlusb))) {
@@ -907,8 +904,7 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
 		return;
 	}
 	ep_num = rtlusb->ep_map.ep_mapping[qnum];
-	_skb = skb;
-	_urb = _rtl_usb_tx_urb_setup(hw, _skb, ep_num);
+	_urb = _rtl_usb_tx_urb_setup(hw, skb, ep_num);
 	if (unlikely(!_urb)) {
 		pr_err("Can't allocate urb. Drop skb!\n");
 		kfree_skb(skb);
-- 
2.25.1


^ permalink raw reply related

* [PATCH AUTOSEL 5.7 253/274] iwlwifi: mvm: fix aux station leak
From: Sasha Levin @ 2020-06-08 23:05 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Sharon, Luca Coelho, Sasha Levin, linux-wireless, netdev
In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org>

From: Sharon <sara.sharon@intel.com>

[ Upstream commit f327236df2afc8c3c711e7e070f122c26974f4da ]

When mvm is initialized we alloc aux station with aux queue.
We later free the station memory when driver is stopped, but we
never free the queue's memory, which casues a leak.

Add a proper de-initialization of the station.

Signed-off-by: Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200529092401.0121c5be55e9.Id7516fbb3482131d0c9dfb51ff20b226617ddb49@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .../net/wireless/intel/iwlwifi/mvm/mac80211.c  |  5 ++---
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c   | 18 +++++++++++++-----
 drivers/net/wireless/intel/iwlwifi/mvm/sta.h   |  6 +++---
 3 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 7aa1350b093e..cf3c46c9b1ee 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -1209,14 +1209,13 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
 	 */
 	flush_work(&mvm->roc_done_wk);
 
+	iwl_mvm_rm_aux_sta(mvm);
+
 	iwl_mvm_stop_device(mvm);
 
 	iwl_mvm_async_handlers_purge(mvm);
 	/* async_handlers_list is empty and will stay empty: HW is stopped */
 
-	/* the fw is stopped, the aux sta is dead: clean up driver state */
-	iwl_mvm_del_aux_sta(mvm);
-
 	/*
 	 * Clear IN_HW_RESTART and HW_RESTART_REQUESTED flag when stopping the
 	 * hw (as restart_complete() won't be called in this case) and mac80211
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 56ae72debb96..07ca8c91499d 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -2080,16 +2080,24 @@ int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
 	return ret;
 }
 
-void iwl_mvm_dealloc_snif_sta(struct iwl_mvm *mvm)
+int iwl_mvm_rm_aux_sta(struct iwl_mvm *mvm)
 {
-	iwl_mvm_dealloc_int_sta(mvm, &mvm->snif_sta);
-}
+	int ret;
 
-void iwl_mvm_del_aux_sta(struct iwl_mvm *mvm)
-{
 	lockdep_assert_held(&mvm->mutex);
 
+	iwl_mvm_disable_txq(mvm, NULL, mvm->aux_queue, IWL_MAX_TID_COUNT, 0);
+	ret = iwl_mvm_rm_sta_common(mvm, mvm->aux_sta.sta_id);
+	if (ret)
+		IWL_WARN(mvm, "Failed sending remove station\n");
 	iwl_mvm_dealloc_int_sta(mvm, &mvm->aux_sta);
+
+	return ret;
+}
+
+void iwl_mvm_dealloc_snif_sta(struct iwl_mvm *mvm)
+{
+	iwl_mvm_dealloc_int_sta(mvm, &mvm->snif_sta);
 }
 
 /*
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h
index 8d70093847cb..da2d1ac01229 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h
@@ -8,7 +8,7 @@
  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
  * Copyright(c) 2015 - 2016 Intel Deutschland GmbH
- * Copyright(c) 2018 - 2019 Intel Corporation
+ * Copyright(c) 2018 - 2020 Intel Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -31,7 +31,7 @@
  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
  * Copyright(c) 2015 - 2016 Intel Deutschland GmbH
- * Copyright(c) 2018 - 2019 Intel Corporation
+ * Copyright(c) 2018 - 2020 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -541,7 +541,7 @@ int iwl_mvm_sta_tx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
 		       int tid, u8 queue, bool start);
 
 int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm);
-void iwl_mvm_del_aux_sta(struct iwl_mvm *mvm);
+int iwl_mvm_rm_aux_sta(struct iwl_mvm *mvm);
 
 int iwl_mvm_alloc_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
 int iwl_mvm_send_add_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
-- 
2.25.1


^ permalink raw reply related

* [PATCH AUTOSEL 5.4 099/175] libertas_tf: avoid a null dereference in pointer priv
From: Sasha Levin @ 2020-06-08 23:17 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Colin Ian King, Kalle Valo, Sasha Levin, linux-wireless, netdev
In-Reply-To: <20200608231848.3366970-1-sashal@kernel.org>

From: Colin Ian King <colin.king@canonical.com>

[ Upstream commit 049ceac308b0d57c4f06b9fb957cdf95d315cf0b ]

Currently there is a check if priv is null when calling lbtf_remove_card
but not in a previous call to if_usb_reset_dev that can also dereference
priv.  Fix this by also only calling lbtf_remove_card if priv is null.

It is noteable that there don't seem to be any bugs reported that the
null pointer dereference has ever occurred, so I'm not sure if the null
check is required, but since we're doing a null check anyway it should
be done for both function calls.

Addresses-Coverity: ("Dereference before null check")
Fixes: baa0280f08c7 ("libertas_tf: don't defer firmware loading until start()")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200501173900.296658-1-colin.king@canonical.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/marvell/libertas_tf/if_usb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/marvell/libertas_tf/if_usb.c b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
index 25ac9db35dbf..bedc09215088 100644
--- a/drivers/net/wireless/marvell/libertas_tf/if_usb.c
+++ b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
@@ -247,10 +247,10 @@ static void if_usb_disconnect(struct usb_interface *intf)
 
 	lbtf_deb_enter(LBTF_DEB_MAIN);
 
-	if_usb_reset_device(priv);
-
-	if (priv)
+	if (priv) {
+		if_usb_reset_device(priv);
 		lbtf_remove_card(priv);
+	}
 
 	/* Unlink and free urb */
 	if_usb_free(cardp);
-- 
2.25.1


^ permalink raw reply related

* [PATCH AUTOSEL 5.4 116/175] ath10k: Remove msdu from idr when management pkt send fails
From: Sasha Levin @ 2020-06-08 23:17 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Rakesh Pillai, Kalle Valo, Sasha Levin, ath10k, linux-wireless,
	netdev
In-Reply-To: <20200608231848.3366970-1-sashal@kernel.org>

From: Rakesh Pillai <pillair@codeaurora.org>

[ Upstream commit c730c477176ad4af86d9aae4d360a7ad840b073a ]

Currently when the sending of any management pkt
via wmi command fails, the packet is being unmapped
freed in the error handling. But the idr entry added,
which is used to track these packet is not getting removed.

Hence, during unload, in wmi cleanup, all the entries
in IDR are removed and the corresponding buffer is
attempted to be freed. This can cause a situation where
one packet is attempted to be freed twice.

Fix this error by rmeoving the msdu from the idr
list when the sending of a management packet over
wmi fails.

Tested HW: WCN3990
Tested FW: WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1

Fixes: 1807da49733e ("ath10k: wmi: add management tx by reference support over wmi")
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1588667015-25490-1-git-send-email-pillair@codeaurora.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath10k/mac.c     |  3 +++
 drivers/net/wireless/ath/ath10k/wmi-ops.h | 10 ++++++++++
 drivers/net/wireless/ath/ath10k/wmi-tlv.c | 15 +++++++++++++++
 3 files changed, 28 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index c6ab1fcde84d..d373602a8014 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3911,6 +3911,9 @@ void ath10k_mgmt_over_wmi_tx_work(struct work_struct *work)
 			if (ret) {
 				ath10k_warn(ar, "failed to transmit management frame by ref via WMI: %d\n",
 					    ret);
+				/* remove this msdu from idr tracking */
+				ath10k_wmi_cleanup_mgmt_tx_send(ar, skb);
+
 				dma_unmap_single(ar->dev, paddr, skb->len,
 						 DMA_TO_DEVICE);
 				ieee80211_free_txskb(ar->hw, skb);
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
index 1491c25518bb..edccabc667e8 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
@@ -133,6 +133,7 @@ struct wmi_ops {
 	struct sk_buff *(*gen_mgmt_tx_send)(struct ath10k *ar,
 					    struct sk_buff *skb,
 					    dma_addr_t paddr);
+	int (*cleanup_mgmt_tx_send)(struct ath10k *ar, struct sk_buff *msdu);
 	struct sk_buff *(*gen_dbglog_cfg)(struct ath10k *ar, u64 module_enable,
 					  u32 log_level);
 	struct sk_buff *(*gen_pktlog_enable)(struct ath10k *ar, u32 filter);
@@ -441,6 +442,15 @@ ath10k_wmi_get_txbf_conf_scheme(struct ath10k *ar)
 	return ar->wmi.ops->get_txbf_conf_scheme(ar);
 }
 
+static inline int
+ath10k_wmi_cleanup_mgmt_tx_send(struct ath10k *ar, struct sk_buff *msdu)
+{
+	if (!ar->wmi.ops->cleanup_mgmt_tx_send)
+		return -EOPNOTSUPP;
+
+	return ar->wmi.ops->cleanup_mgmt_tx_send(ar, msdu);
+}
+
 static inline int
 ath10k_wmi_mgmt_tx_send(struct ath10k *ar, struct sk_buff *msdu,
 			dma_addr_t paddr)
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index eb0c963d9fd5..9d5b9df29c35 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -2837,6 +2837,18 @@ ath10k_wmi_tlv_op_gen_request_stats(struct ath10k *ar, u32 stats_mask)
 	return skb;
 }
 
+static int
+ath10k_wmi_tlv_op_cleanup_mgmt_tx_send(struct ath10k *ar,
+				       struct sk_buff *msdu)
+{
+	struct ath10k_skb_cb *cb = ATH10K_SKB_CB(msdu);
+	struct ath10k_wmi *wmi = &ar->wmi;
+
+	idr_remove(&wmi->mgmt_pending_tx, cb->msdu_id);
+
+	return 0;
+}
+
 static int
 ath10k_wmi_mgmt_tx_alloc_msdu_id(struct ath10k *ar, struct sk_buff *skb,
 				 dma_addr_t paddr)
@@ -2911,6 +2923,8 @@ ath10k_wmi_tlv_op_gen_mgmt_tx_send(struct ath10k *ar, struct sk_buff *msdu,
 	if (desc_id < 0)
 		goto err_free_skb;
 
+	cb->msdu_id = desc_id;
+
 	ptr = (void *)skb->data;
 	tlv = ptr;
 	tlv->tag = __cpu_to_le16(WMI_TLV_TAG_STRUCT_MGMT_TX_CMD);
@@ -4339,6 +4353,7 @@ static const struct wmi_ops wmi_tlv_ops = {
 	.gen_force_fw_hang = ath10k_wmi_tlv_op_gen_force_fw_hang,
 	/* .gen_mgmt_tx = not implemented; HTT is used */
 	.gen_mgmt_tx_send = ath10k_wmi_tlv_op_gen_mgmt_tx_send,
+	.cleanup_mgmt_tx_send = ath10k_wmi_tlv_op_cleanup_mgmt_tx_send,
 	.gen_dbglog_cfg = ath10k_wmi_tlv_op_gen_dbglog_cfg,
 	.gen_pktlog_enable = ath10k_wmi_tlv_op_gen_pktlog_enable,
 	.gen_pktlog_disable = ath10k_wmi_tlv_op_gen_pktlog_disable,
-- 
2.25.1


^ permalink raw reply related

* [PATCH AUTOSEL 5.4 117/175] wcn36xx: Fix error handling path in 'wcn36xx_probe()'
From: Sasha Levin @ 2020-06-08 23:17 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Christophe JAILLET, Bjorn Andersson, Kalle Valo, Sasha Levin,
	wcn36xx, linux-wireless, netdev
In-Reply-To: <20200608231848.3366970-1-sashal@kernel.org>

From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

[ Upstream commit a86308fc534edeceaf64670c691e17485436a4f4 ]

In case of error, 'qcom_wcnss_open_channel()' must be undone by a call to
'rpmsg_destroy_ept()', as already done in the remove function.

Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200507043619.200051-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/wcn36xx/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index 79998a3ddb7a..ad051f34e65b 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -1341,7 +1341,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
 	if (addr && ret != ETH_ALEN) {
 		wcn36xx_err("invalid local-mac-address\n");
 		ret = -EINVAL;
-		goto out_wq;
+		goto out_destroy_ept;
 	} else if (addr) {
 		wcn36xx_info("mac address: %pM\n", addr);
 		SET_IEEE80211_PERM_ADDR(wcn->hw, addr);
@@ -1349,7 +1349,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
 
 	ret = wcn36xx_platform_get_resources(wcn, pdev);
 	if (ret)
-		goto out_wq;
+		goto out_destroy_ept;
 
 	wcn36xx_init_ieee80211(wcn);
 	ret = ieee80211_register_hw(wcn->hw);
@@ -1361,6 +1361,8 @@ static int wcn36xx_probe(struct platform_device *pdev)
 out_unmap:
 	iounmap(wcn->ccu_base);
 	iounmap(wcn->dxe_base);
+out_destroy_ept:
+	rpmsg_destroy_ept(wcn->smd_channel);
 out_wq:
 	ieee80211_free_hw(hw);
 out_err:
-- 
2.25.1


^ permalink raw reply related

* [PATCH AUTOSEL 5.4 128/175] rtlwifi: Fix a double free in _rtl_usb_tx_urb_setup()
From: Sasha Levin @ 2020-06-08 23:18 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Dan Carpenter, Kalle Valo, Sasha Levin, linux-wireless, netdev
In-Reply-To: <20200608231848.3366970-1-sashal@kernel.org>

From: Dan Carpenter <dan.carpenter@oracle.com>

[ Upstream commit beb12813bc75d4a23de43b85ad1c7cb28d27631e ]

Seven years ago we tried to fix a leak but actually introduced a double
free instead.  It was an understandable mistake because the code was a
bit confusing and the free was done in the wrong place.  The "skb"
pointer is freed in both _rtl_usb_tx_urb_setup() and _rtl_usb_transmit().
The free belongs _rtl_usb_transmit() instead of _rtl_usb_tx_urb_setup()
and I've cleaned the code up a bit to hopefully make it more clear.

Fixes: 36ef0b473fbf ("rtlwifi: usb: add missing freeing of skbuff")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200513093951.GD347693@mwanda
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/realtek/rtlwifi/usb.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c
index 348b0072cdd6..c66c6dc00378 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
@@ -881,10 +881,8 @@ static struct urb *_rtl_usb_tx_urb_setup(struct ieee80211_hw *hw,
 
 	WARN_ON(NULL == skb);
 	_urb = usb_alloc_urb(0, GFP_ATOMIC);
-	if (!_urb) {
-		kfree_skb(skb);
+	if (!_urb)
 		return NULL;
-	}
 	_rtl_install_trx_info(rtlusb, skb, ep_num);
 	usb_fill_bulk_urb(_urb, rtlusb->udev, usb_sndbulkpipe(rtlusb->udev,
 			  ep_num), skb->data, skb->len, _rtl_tx_complete, skb);
@@ -898,7 +896,6 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
 	struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
 	u32 ep_num;
 	struct urb *_urb = NULL;
-	struct sk_buff *_skb = NULL;
 
 	WARN_ON(NULL == rtlusb->usb_tx_aggregate_hdl);
 	if (unlikely(IS_USB_STOP(rtlusb))) {
@@ -907,8 +904,7 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
 		return;
 	}
 	ep_num = rtlusb->ep_map.ep_mapping[qnum];
-	_skb = skb;
-	_urb = _rtl_usb_tx_urb_setup(hw, _skb, ep_num);
+	_urb = _rtl_usb_tx_urb_setup(hw, skb, ep_num);
 	if (unlikely(!_urb)) {
 		pr_err("Can't allocate urb. Drop skb!\n");
 		kfree_skb(skb);
-- 
2.25.1


^ permalink raw reply related

* [PATCH AUTOSEL 4.19 002/106] ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
From: Sasha Levin @ 2020-06-08 23:20 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Qiujun Huang, syzbot+b1c61e5f11be5782f192, Kalle Valo,
	Sasha Levin, linux-wireless, netdev
In-Reply-To: <20200608232238.3368589-1-sashal@kernel.org>

From: Qiujun Huang <hqjagain@gmail.com>

[ Upstream commit e4ff08a4d727146bb6717a39a8d399d834654345 ]

Write out of slab bounds. We should check epid.

The case reported by syzbot:
https://lore.kernel.org/linux-usb/0000000000006ac55b05a1c05d72@google.com
BUG: KASAN: use-after-free in htc_process_conn_rsp
drivers/net/wireless/ath/ath9k/htc_hst.c:131 [inline]
BUG: KASAN: use-after-free in ath9k_htc_rx_msg+0xa25/0xaf0
drivers/net/wireless/ath/ath9k/htc_hst.c:443
Write of size 2 at addr ffff8881cea291f0 by task swapper/1/0

Call Trace:
 htc_process_conn_rsp drivers/net/wireless/ath/ath9k/htc_hst.c:131
[inline]
ath9k_htc_rx_msg+0xa25/0xaf0
drivers/net/wireless/ath/ath9k/htc_hst.c:443
ath9k_hif_usb_reg_in_cb+0x1ba/0x630
drivers/net/wireless/ath/ath9k/hif_usb.c:718
__usb_hcd_giveback_urb+0x29a/0x550 drivers/usb/core/hcd.c:1650
usb_hcd_giveback_urb+0x368/0x420 drivers/usb/core/hcd.c:1716
dummy_timer+0x1258/0x32ae drivers/usb/gadget/udc/dummy_hcd.c:1966
call_timer_fn+0x195/0x6f0 kernel/time/timer.c:1404
expire_timers kernel/time/timer.c:1449 [inline]
__run_timers kernel/time/timer.c:1773 [inline]
__run_timers kernel/time/timer.c:1740 [inline]
run_timer_softirq+0x5f9/0x1500 kernel/time/timer.c:1786

Reported-and-tested-by: syzbot+b1c61e5f11be5782f192@syzkaller.appspotmail.com
Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200404041838.10426-4-hqjagain@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath9k/htc_hst.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c
index 1bf63a4efb4c..d2e062eaf561 100644
--- a/drivers/net/wireless/ath/ath9k/htc_hst.c
+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c
@@ -113,6 +113,9 @@ static void htc_process_conn_rsp(struct htc_target *target,
 
 	if (svc_rspmsg->status == HTC_SERVICE_SUCCESS) {
 		epid = svc_rspmsg->endpoint_id;
+		if (epid < 0 || epid >= ENDPOINT_MAX)
+			return;
+
 		service_id = be16_to_cpu(svc_rspmsg->service_id);
 		max_msglen = be16_to_cpu(svc_rspmsg->max_msg_len);
 		endpoint = &target->endpoint[epid];
-- 
2.25.1


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox