From: Ping-Ke Shih <pkshih@realtek.com>
To: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Stefan Lippers-Hollmann <s.l-h@gmx.de>,
Christian Hewitt <chewitt@libreelec.tv>
Subject: RE: [PATCH v6 6/6] wifi: rtlwifi: Adjust rtl8192d-common for USB
Date: Mon, 22 Apr 2024 03:39:43 +0000 [thread overview]
Message-ID: <f080fd27b21147869e8b923891d5dcff@realtek.com> (raw)
In-Reply-To: <45848eb2-9c52-4aac-b7b0-b584955e41d7@gmail.com>
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> A few of the shared functions need small changes for the USB driver:
> - firmware loading
> - efuse reading
> - rate mask updating
> - rf register reading
> - initial gain for scanning
>
> Also, add a few macros to wifi.h and initialise rtlhal.interfaceindex
> for USB devices.
>
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
[...]
> @@ -965,12 +983,20 @@ static void rtl92de_update_hal_rate_mask(struct ieee80211_hw *hw,
> break;
> }
>
> - value[0] = (ratr_bitmap & 0x0fffffff) | (ratr_index << 28);
> - value[1] = macid | (shortgi ? 0x20 : 0x00) | 0x80;
> + le32p_replace_bits(&rate_mask.rate_mask_and_raid, ratr_bitmap, RATE_MASK_MASK);
> + le32p_replace_bits(&rate_mask.rate_mask_and_raid, ratr_index, RAID_MASK);
> + u8p_replace_bits(&rate_mask.macid_and_short_gi, macid, MACID_MASK);
> + u8p_replace_bits(&rate_mask.macid_and_short_gi, shortgi, SHORT_GI_MASK);
> + u8p_replace_bits(&rate_mask.macid_and_short_gi, 1, BIT(7));
> +
> rtl_dbg(rtlpriv, COMP_RATR, DBG_DMESG,
> - "ratr_bitmap :%x value0:%x value1:%x\n",
> - ratr_bitmap, value[0], value[1]);
> - rtl92d_fill_h2c_cmd(hw, H2C_RA_MASK, 5, (u8 *)value);
> + "Rate_index:%x, ratr_val:%x, %5phC\n",
> + ratr_index, ratr_bitmap, &rate_mask);
> + memcpy(rtlpriv->rate_mask, &rate_mask, sizeof(rtlpriv->rate_mask));
> + /* rtl92d_fill_h2c_cmd() does USB I/O and will result in a
> + * "scheduled while atomic" if called directly
> + */
> + schedule_work(&rtlpriv->works.fill_h2c_cmd);
This function will be used by both PCI and USB, right? But,
only USB initialize/cancel rtlpriv->works.fill_h2c_cmd.
next prev parent reply other threads:[~2024-04-22 3:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 13:34 [PATCH v6 0/6] wifi: rtlwifi: Move common code from rtl8192de to rtl8192d-common Bitterblue Smith
2024-04-19 13:35 ` [PATCH v6 1/6] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power Bitterblue Smith
2024-04-19 13:36 ` [PATCH v6 2/6] wifi: rtlwifi: rtl8192de: Fix low speed with WPA3-SAE Bitterblue Smith
2024-04-19 13:37 ` [PATCH v6 3/6] wifi: rtlwifi: rtl8192de: Fix endianness issue in RX path Bitterblue Smith
2024-04-19 13:37 ` [PATCH v6 4/6] wifi: rtlwifi: Move code from rtl8192de to rtl8192d-common Bitterblue Smith
2024-04-22 2:55 ` Ping-Ke Shih
2024-04-22 17:25 ` Bitterblue Smith
2024-04-23 0:48 ` Ping-Ke Shih
2024-04-23 11:06 ` Bitterblue Smith
2024-04-19 13:38 ` [PATCH v6 5/6] wifi: rtlwifi: Clean up rtl8192d-common a bit Bitterblue Smith
2024-04-22 3:13 ` Ping-Ke Shih
2024-04-22 17:18 ` Bitterblue Smith
2024-04-19 13:39 ` [PATCH v6 6/6] wifi: rtlwifi: Adjust rtl8192d-common for USB Bitterblue Smith
2024-04-22 3:39 ` Ping-Ke Shih [this message]
2024-04-22 17:13 ` Bitterblue Smith
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=f080fd27b21147869e8b923891d5dcff@realtek.com \
--to=pkshih@realtek.com \
--cc=Larry.Finger@lwfinger.net \
--cc=chewitt@libreelec.tv \
--cc=linux-wireless@vger.kernel.org \
--cc=rtl8821cerfe2@gmail.com \
--cc=s.l-h@gmx.de \
/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.