All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ramesh Ramalingam" <r-ramalingam@ti.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v6 15/17] wifi: cc33xx: Add ps.c, ps.h
Date: Thu, 03 Dec 2026 07:43:09 +0000	[thread overview]
Message-ID: <sashiko-outbox-247314@kernel.org> (raw)
In-Reply-To: <20261203070906.1294171-16-r-ramalingam@ti.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] wifi: cc33xx: cc33xx_ps_set_mode() is a silent hardware no-op
--

commit b6e32d633963d12afa6bfcf6372448d5ccf79991
Author: Michael Nemanov <michael.nemanov@ti.com>

wifi: cc33xx: Add ps.c, ps.h

This commit adds ps.c and ps.h implementing cc33xx_ps_set_mode() to configure
802.11 power-save modes for the cc33xx driver.

> diff --git a/drivers/net/wireless/ti/cc33xx/ps.c b/drivers/net/wireless/ti/cc33xx/ps.c
> new file mode 100644
> index 0000000000000..f2ed1678edb95
> --- /dev/null
> +++ b/drivers/net/wireless/ti/cc33xx/ps.c
> @@ -0,0 +1,39 @@
[ ... ]
> +int cc33xx_ps_set_mode(struct cc33xx *cc, struct cc33xx_vif *wlvif,
> +		       enum cc33xx_cmd_ps_mode_e mode)
> +{
> +	int ret;
> +	u16 timeout = cc->conf.host_conf.conn.dynamic_ps_timeout;
> +
> +	switch (mode) {
> +	case STATION_AUTO_PS_MODE:
> +	case STATION_POWER_SAVE_MODE:
> +		ret = cc33xx_cmd_ps_mode(cc, wlvif, mode, timeout);
> +		if (ret < 0)
> +			return ret;
> +
> +		set_bit(WLVIF_FLAG_IN_PS, &wlvif->flags);
> +		break;
> +
> +	case STATION_ACTIVE_MODE:
> +		ret = cc33xx_cmd_ps_mode(cc, wlvif, mode, 0);
> +		if (ret < 0)
> +			return ret;
> +
> +		clear_bit(WLVIF_FLAG_IN_PS, &wlvif->flags);
> +		break;

[Severity: Medium]
Does cc33xx_ps_set_mode() actually change the hardware power-save state?

cc33xx_cmd_ps_mode() submits CMD_SET_PS_MODE to cc33xx_cmd_send(), but
CMD_SET_PS_MODE is defined after CMD_LAST_SUPPORTED_COMMAND in cmd.h.
cc33xx_cmd_send() checks for id >= CMD_LAST_SUPPORTED_COMMAND and returns 0
immediately without sending anything to firmware.

As a result, BSS_CHANGED_PS transitions in cc33xx_bss_info_changed_sta()
toggle WLVIF_FLAG_IN_PS and report success to mac80211 even though
cc33xx_init_ieee80211() advertises SUPPORTS_PS and SUPPORTS_DYNAMIC_PS,
leaving the firmware power-save mode unchanged.

Should this use a supported firmware command to override power-save mode, or
drop the non-functional override path and advertised power-save flags?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203070906.1294171-1-r-ramalingam@ti.com?part=15

  reply	other threads:[~2026-12-03  7:43 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  7:08 [PATCH v6 00/17] wifi: cc33xx: Add driver for new TI CC33xx wireless device family Ramesh Ramalingam
2026-12-03  7:08 ` [PATCH v6 01/17] dt-bindings: net: wireless: cc33xx: Add ti,cc33xx.yaml Ramesh Ramalingam
2026-12-03  7:20   ` sashiko-bot
2026-12-03 18:27   ` Rob Herring
2026-12-03  7:08 ` [PATCH v6 02/17] wifi: cc33xx: Add cc33xx.h, cc33xx_i.h Ramesh Ramalingam
2026-12-03  7:31   ` sashiko-bot
2026-12-03  7:08 ` [PATCH v6 03/17] wifi: cc33xx: Add debug.h Ramesh Ramalingam
2026-12-03  7:26   ` sashiko-bot
2026-12-03  7:08 ` [PATCH v6 04/17] wifi: cc33xx: Add sdio.c, io.c, io.h Ramesh Ramalingam
2026-12-03  7:33   ` sashiko-bot
2026-12-03  7:08 ` [PATCH v6 05/17] wifi: cc33xx: Add cmd.c, cmd.h Ramesh Ramalingam
2026-12-03  7:42   ` sashiko-bot
2026-12-03  7:08 ` [PATCH v6 06/17] wifi: cc33xx: Add acx.c, acx.h Ramesh Ramalingam
2026-12-03  7:32   ` sashiko-bot
2026-12-03  7:08 ` [PATCH v6 07/17] wifi: cc33xx: Add event.c, event.h Ramesh Ramalingam
2026-12-03  7:31   ` sashiko-bot
2026-12-03  7:08 ` [PATCH v6 08/17] wifi: cc33xx: Add boot.c, boot.h Ramesh Ramalingam
2026-12-03  7:38   ` sashiko-bot
2026-12-03  7:08 ` [PATCH v6 09/17] wifi: cc33xx: Add main.c Ramesh Ramalingam
2026-12-03  9:12   ` Uwe Kleine-König
2026-12-03  7:08 ` [PATCH v6 10/17] wifi: cc33xx: Add rx.c, rx.h Ramesh Ramalingam
2026-12-03  7:33   ` sashiko-bot
2026-12-03  7:09 ` [PATCH v6 11/17] wifi: cc33xx: Add tx.c, tx.h Ramesh Ramalingam
2026-12-03  7:47   ` sashiko-bot
2026-12-03  7:09 ` [PATCH v6 12/17] wifi: cc33xx: Add init.c, init.h Ramesh Ramalingam
2026-12-03  7:43   ` sashiko-bot
2026-12-03  7:09 ` [PATCH v6 13/17] wifi: cc33xx: Add scan.c, scan.h Ramesh Ramalingam
2026-12-03  7:52   ` sashiko-bot
2026-12-03  7:09 ` [PATCH v6 14/17] wifi: cc33xx: Add conf.h Ramesh Ramalingam
2026-12-03  7:50   ` sashiko-bot
2026-12-03  7:09 ` [PATCH v6 15/17] wifi: cc33xx: Add ps.c, ps.h Ramesh Ramalingam
2026-12-03  7:43   ` sashiko-bot [this message]
2026-12-03  7:09 ` [PATCH v6 16/17] wifi: cc33xx: Add testmode.c, testmode.h Ramesh Ramalingam
2026-12-03  7:48   ` sashiko-bot
2026-12-03  7:09 ` [PATCH v6 17/17] wifi: cc33xx: Add Kconfig, Makefile Ramesh Ramalingam
2026-12-03  7:46   ` sashiko-bot

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=sashiko-outbox-247314@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=r-ramalingam@ti.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.