mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
wifi: rtw89: 8922d: add set channel of RF part
The set channel of RF part is to configure channel and bandwidth on a register. The function to encode channel and bandwidth into register value will be implemented by coming patch. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260324062049.52266-8-pkshih@realtek.com
This commit is contained in:
parent
521f3a653d
commit
1b622535a5
|
|
@ -8,6 +8,7 @@
|
|||
#include "phy.h"
|
||||
#include "reg.h"
|
||||
#include "rtw8922d.h"
|
||||
#include "rtw8922d_rfk.h"
|
||||
#include "util.h"
|
||||
|
||||
#define RTW8922D_FW_FORMAT_MAX 0
|
||||
|
|
|
|||
33
drivers/net/wireless/realtek/rtw89/rtw8922d_rfk.c
Normal file
33
drivers/net/wireless/realtek/rtw89/rtw8922d_rfk.c
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/* Copyright(c) 2026 Realtek Corporation
|
||||
*/
|
||||
|
||||
#include "phy.h"
|
||||
#include "reg.h"
|
||||
#include "rtw8922d.h"
|
||||
#include "rtw8922d_rfk.h"
|
||||
|
||||
static
|
||||
void rtw8922d_ctl_band_ch_bw(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy,
|
||||
const struct rtw89_chan *chan)
|
||||
{
|
||||
u8 synpath;
|
||||
u32 rf18;
|
||||
|
||||
synpath = rtw89_phy_get_syn_sel(rtwdev, phy);
|
||||
rf18 = rtw89_chip_chan_to_rf18_val(rtwdev, chan);
|
||||
|
||||
rtw89_write_rf(rtwdev, synpath, RR_RSV1, RFREG_MASK, 0x0);
|
||||
rtw89_write_rf(rtwdev, synpath, RR_MOD, RFREG_MASK, 0x30000);
|
||||
rtw89_write_rf(rtwdev, synpath, RR_CFGCH, RFREG_MASK, rf18);
|
||||
fsleep(400);
|
||||
rtw89_write_rf(rtwdev, synpath, RR_RSV1, RFREG_MASK, 0x1);
|
||||
rtw89_write_rf(rtwdev, synpath, RR_CFGCH_V1, RFREG_MASK, rf18);
|
||||
}
|
||||
|
||||
void rtw8922d_set_channel_rf(struct rtw89_dev *rtwdev,
|
||||
const struct rtw89_chan *chan,
|
||||
enum rtw89_phy_idx phy_idx)
|
||||
{
|
||||
rtw8922d_ctl_band_ch_bw(rtwdev, phy_idx, chan);
|
||||
}
|
||||
14
drivers/net/wireless/realtek/rtw89/rtw8922d_rfk.h
Normal file
14
drivers/net/wireless/realtek/rtw89/rtw8922d_rfk.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/* Copyright(c) 2026 Realtek Corporation
|
||||
*/
|
||||
|
||||
#ifndef __RTW89_8922D_RFK_H__
|
||||
#define __RTW89_8922D_RFK_H__
|
||||
|
||||
#include "core.h"
|
||||
|
||||
void rtw8922d_set_channel_rf(struct rtw89_dev *rtwdev,
|
||||
const struct rtw89_chan *chan,
|
||||
enum rtw89_phy_idx phy_idx);
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue
Block a user