mirror of https://gitee.com/openkylin/linux.git
rsi: Update baseband RF programming frame
Baseband RF programming frame configured to device is modified to use common descriptor structure. Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com> Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
3a9828c92b
commit
5c7ca1bbf2
|
@ -577,34 +577,36 @@ int rsi_send_aggregation_params_frame(struct rsi_common *common,
|
|||
static int rsi_program_bb_rf(struct rsi_common *common)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
struct rsi_mac_frame *mgmt_frame;
|
||||
struct rsi_bb_rf_prog *bb_rf_prog;
|
||||
u16 frame_len = sizeof(struct rsi_bb_rf_prog);
|
||||
|
||||
rsi_dbg(MGMT_TX_ZONE, "%s: Sending program BB/RF frame\n", __func__);
|
||||
|
||||
skb = dev_alloc_skb(FRAME_DESC_SZ);
|
||||
skb = dev_alloc_skb(frame_len);
|
||||
if (!skb) {
|
||||
rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
|
||||
__func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset(skb->data, 0, FRAME_DESC_SZ);
|
||||
mgmt_frame = (struct rsi_mac_frame *)skb->data;
|
||||
memset(skb->data, 0, frame_len);
|
||||
bb_rf_prog = (struct rsi_bb_rf_prog *)skb->data;
|
||||
|
||||
mgmt_frame->desc_word[0] = cpu_to_le16(RSI_WIFI_MGMT_Q << 12);
|
||||
mgmt_frame->desc_word[1] = cpu_to_le16(BBP_PROG_IN_TA);
|
||||
mgmt_frame->desc_word[4] = cpu_to_le16(common->endpoint);
|
||||
rsi_set_len_qno(&bb_rf_prog->desc_dword0.len_qno, 0, RSI_WIFI_MGMT_Q);
|
||||
bb_rf_prog->desc_dword0.frame_type = BBP_PROG_IN_TA;
|
||||
bb_rf_prog->endpoint = common->endpoint;
|
||||
bb_rf_prog->rf_power_mode = common->wlan_rf_power_mode;
|
||||
|
||||
if (common->rf_reset) {
|
||||
mgmt_frame->desc_word[7] = cpu_to_le16(RF_RESET_ENABLE);
|
||||
bb_rf_prog->flags = cpu_to_le16(RF_RESET_ENABLE);
|
||||
rsi_dbg(MGMT_TX_ZONE, "%s: ===> RF RESET REQUEST SENT <===\n",
|
||||
__func__);
|
||||
common->rf_reset = 0;
|
||||
}
|
||||
common->bb_rf_prog_count = 1;
|
||||
mgmt_frame->desc_word[7] |= cpu_to_le16(PUT_BBP_RESET |
|
||||
BBP_REG_WRITE | (RSI_RF_TYPE << 4));
|
||||
skb_put(skb, FRAME_DESC_SZ);
|
||||
bb_rf_prog->flags |= cpu_to_le16(PUT_BBP_RESET | BBP_REG_WRITE |
|
||||
(RSI_RF_TYPE << 4));
|
||||
skb_put(skb, frame_len);
|
||||
|
||||
return rsi_send_internal_mgmt_frame(common, skb);
|
||||
}
|
||||
|
|
|
@ -294,6 +294,18 @@ struct rsi_aggr_params {
|
|||
u8 peer_id;
|
||||
} __packed;
|
||||
|
||||
struct rsi_bb_rf_prog {
|
||||
struct rsi_cmd_desc_dword0 desc_dword0;
|
||||
__le16 reserved1;
|
||||
u8 rf_power_mode;
|
||||
u8 reserved2;
|
||||
u8 endpoint;
|
||||
u8 reserved3;
|
||||
__le16 reserved4;
|
||||
__le16 reserved5;
|
||||
__le16 flags;
|
||||
} __packed;
|
||||
|
||||
struct rsi_vap_caps {
|
||||
__le16 desc_word[8];
|
||||
u8 mac_addr[6];
|
||||
|
|
Loading…
Reference in New Issue