linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Fuzzey, Martin" <martin.fuzzey@flowbird.group>
To: linux-wireless@vger.kernel.org
Cc: Sharvari Harisangam <sharvari.harisangam@nxp.com>,
	Ganapathi Bhat <ganapathi017@gmail.com>
Subject: [REGRESSION] mwifiex: mwifiex_get_chan_type noisy and possibly incorrect after kernel upgrade
Date: Fri, 26 Nov 2021 11:20:39 +0100	[thread overview]
Message-ID: <CANh8QzxPWN7uHGYaU1rpMF+J=vqjbLs+o325UcQc54+6OWiVHw@mail.gmail.com> (raw)

Hi,

After upgrading an old system using a SD8787 wifi module from kernel
4.4 to 5.4.143 I started getting error messages in the logs
    mwifiex_sdio mmc2:0001:1: CMD_RESP: cmd 0x23f error, result=0x2

The same error occurs on 5.15 too.
With Android userspace this occurs every 3 seconds but can be
reproduced with a Linux userspace too using the wpa_cli "signal_poll"
command
(Android polls that command via wpa_supplicant)

root@hw-test:~# wpa_cli
wpa_cli v2.8-devel
Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi> and contributors
...
Selected interface 'mlan0'
Interactive mode

> signal_poll
[  143.963217] mwifiex_sdio mmc2:0001:1: CMD_RESP: cmd 0x23f error, result=0x2
RSSI=-5
LINKSPEED=65
NOISE=-75
FREQUENCY=2437
WIDTH=20 MHz
CENTER_FRQ1=2437
AVG_RSSI=-5

Firmware version is 14.68.35.p66  (latest from linux-firmware git)

The 0x23f command is HostCmd_CMD_STA_CONFIGURE and was added in 4.16 by
    28bf8312a983 ("mwifiex: get_channel from firmware")

I don't see anywhere in the code defining the 0x2 result code.

The error occurs during processing of the netlink
NL80211_CMD_GET_INTERFACE command which is part of
wpa_supplicant's nl80211_signal_poll()

Kernel side callstack is
nl80211_get_interface
    nl80211_send_iface
        mwifiex_cfg80211_get_channel
                mwifiex_get_chan_type
                    mwifiex_get_chan_info
                        mwifiex_send_cmd(HostCmd_CMD_STA_CONFIGURE,
HostCmd_ACT_GEN_GET)


In addition to the log spam the result is also potentially incorrect
since when the command fails a 20MHz channel width is assumed.
The connection still works correctly however

Regards,

Martin

                 reply	other threads:[~2021-11-26 10:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANh8QzxPWN7uHGYaU1rpMF+J=vqjbLs+o325UcQc54+6OWiVHw@mail.gmail.com' \
    --to=martin.fuzzey@flowbird.group \
    --cc=ganapathi017@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sharvari.harisangam@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).