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)
|
static int rsi_program_bb_rf(struct rsi_common *common)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb;
|
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__);
|
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) {
|
if (!skb) {
|
||||||
rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
|
rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
|
||||||
__func__);
|
__func__);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(skb->data, 0, FRAME_DESC_SZ);
|
memset(skb->data, 0, frame_len);
|
||||||
mgmt_frame = (struct rsi_mac_frame *)skb->data;
|
bb_rf_prog = (struct rsi_bb_rf_prog *)skb->data;
|
||||||
|
|
||||||
mgmt_frame->desc_word[0] = cpu_to_le16(RSI_WIFI_MGMT_Q << 12);
|
rsi_set_len_qno(&bb_rf_prog->desc_dword0.len_qno, 0, RSI_WIFI_MGMT_Q);
|
||||||
mgmt_frame->desc_word[1] = cpu_to_le16(BBP_PROG_IN_TA);
|
bb_rf_prog->desc_dword0.frame_type = BBP_PROG_IN_TA;
|
||||||
mgmt_frame->desc_word[4] = cpu_to_le16(common->endpoint);
|
bb_rf_prog->endpoint = common->endpoint;
|
||||||
|
bb_rf_prog->rf_power_mode = common->wlan_rf_power_mode;
|
||||||
|
|
||||||
if (common->rf_reset) {
|
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",
|
rsi_dbg(MGMT_TX_ZONE, "%s: ===> RF RESET REQUEST SENT <===\n",
|
||||||
__func__);
|
__func__);
|
||||||
common->rf_reset = 0;
|
common->rf_reset = 0;
|
||||||
}
|
}
|
||||||
common->bb_rf_prog_count = 1;
|
common->bb_rf_prog_count = 1;
|
||||||
mgmt_frame->desc_word[7] |= cpu_to_le16(PUT_BBP_RESET |
|
bb_rf_prog->flags |= cpu_to_le16(PUT_BBP_RESET | BBP_REG_WRITE |
|
||||||
BBP_REG_WRITE | (RSI_RF_TYPE << 4));
|
(RSI_RF_TYPE << 4));
|
||||||
skb_put(skb, FRAME_DESC_SZ);
|
skb_put(skb, frame_len);
|
||||||
|
|
||||||
return rsi_send_internal_mgmt_frame(common, skb);
|
return rsi_send_internal_mgmt_frame(common, skb);
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,6 +294,18 @@ struct rsi_aggr_params {
|
||||||
u8 peer_id;
|
u8 peer_id;
|
||||||
} __packed;
|
} __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 {
|
struct rsi_vap_caps {
|
||||||
__le16 desc_word[8];
|
__le16 desc_word[8];
|
||||||
u8 mac_addr[6];
|
u8 mac_addr[6];
|
||||||
|
|
Loading…
Reference in New Issue