Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16cefa44 authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kalle Valo
Browse files

rtlwifi: Add hal_op c2h_ra_report_handler for special process



We're going to merge C2H handler into one, but one special case is to
handle RA_REPORT that implements in individual IC folder. So this commit
adds a hal_op for caller in common code.

Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent ff77960d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -876,7 +876,7 @@ void rtl92ee_set_p2p_ps_offload_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state)
			     (u8 *)p2p_ps_offload);
}

static void _rtl92ee_c2h_ra_report_handler(struct ieee80211_hw *hw,
void rtl92ee_c2h_ra_report_handler(struct ieee80211_hw *hw,
				   u8 *cmd_buf, u8 cmd_len)
{
	u8 rate = cmd_buf[0] & 0x3F;
@@ -889,6 +889,7 @@ void rtl92ee_c2h_content_parsing(struct ieee80211_hw *hw, u8 c2h_cmd_id,
				 u8 c2h_cmd_len, u8 *tmp_buf)
{
	struct rtl_priv *rtlpriv = rtl_priv(hw);
	struct rtl_hal_ops *hal_ops = rtlpriv->cfg->ops;
	struct rtl_btc_ops *btc_ops = rtlpriv->btcoexist.btc_ops;

	switch (c2h_cmd_id) {
@@ -920,7 +921,7 @@ void rtl92ee_c2h_content_parsing(struct ieee80211_hw *hw, u8 c2h_cmd_id,
						     c2h_cmd_len);
		break;
	case C2H_RA_RPT:
		_rtl92ee_c2h_ra_report_handler(hw, tmp_buf, c2h_cmd_len);
		hal_ops->c2h_ra_report_handler(hw, tmp_buf, c2h_cmd_len);
		break;
	default:
		RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE,
+2 −0
Original line number Diff line number Diff line
@@ -182,4 +182,6 @@ void rtl92ee_set_p2p_ps_offload_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state);
void rtl92ee_c2h_packet_handler(struct ieee80211_hw *hw, u8 *buffer, u8 len);
void rtl92ee_c2h_content_parsing(struct ieee80211_hw *hw, u8 c2h_cmd_id,
				 u8 c2h_cmd_len, u8 *tmp_buf);
void rtl92ee_c2h_ra_report_handler(struct ieee80211_hw *hw,
				   u8 *cmd_buf, u8 cmd_len);
#endif
+1 −0
Original line number Diff line number Diff line
@@ -252,6 +252,7 @@ static struct rtl_hal_ops rtl8192ee_hal_ops = {
	.get_btc_status = rtl92ee_get_btc_status,
	.rx_command_packet = rtl92ee_rx_command_packet,
	.c2h_content_parsing = rtl92ee_c2h_content_parsing,
	.c2h_ra_report_handler = rtl92ee_c2h_ra_report_handler,
};

static struct rtl_mod_params rtl92ee_mod_params = {
+3 −2
Original line number Diff line number Diff line
@@ -1907,7 +1907,7 @@ void rtl8821ae_set_p2p_ps_offload_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state)
			H2C_8821AE_P2P_PS_OFFLOAD, 1, (u8 *)p2p_ps_offload);
}

static void rtl8821ae_c2h_ra_report_handler(struct ieee80211_hw *hw,
void rtl8821ae_c2h_ra_report_handler(struct ieee80211_hw *hw,
				     u8 *cmd_buf, u8 cmd_len)
{
	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
@@ -1923,6 +1923,7 @@ void rtl8821ae_c2h_content_parsing(struct ieee80211_hw *hw,
				   u8 *tmp_buf)
{
	struct rtl_priv *rtlpriv = rtl_priv(hw);
	struct rtl_hal_ops *hal_ops = rtlpriv->cfg->ops;
	struct rtl_btc_ops *btc_ops = rtlpriv->btcoexist.btc_ops;

	switch (c2h_cmd_id) {
@@ -1933,7 +1934,7 @@ void rtl8821ae_c2h_content_parsing(struct ieee80211_hw *hw,
		rtl_tx_report_handler(hw, tmp_buf, c2h_cmd_len);
		break;
	case C2H_RA_RPT:
		rtl8821ae_c2h_ra_report_handler(hw, tmp_buf, c2h_cmd_len);
		hal_ops->c2h_ra_report_handler(hw, tmp_buf, c2h_cmd_len);
		break;
	case C2H_BT_INFO:
		RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD,
+2 −0
Original line number Diff line number Diff line
@@ -322,4 +322,6 @@ void rtl8821ae_c2h_packet_handler(struct ieee80211_hw *hw,
void rtl8821ae_c2h_content_parsing(struct ieee80211_hw *hw,
				   u8 c2h_cmd_id, u8 c2h_cmd_len,
				   u8 *tmp_buf);
void rtl8821ae_c2h_ra_report_handler(struct ieee80211_hw *hw,
				     u8 *cmd_buf, u8 cmd_len);
#endif
Loading