Commit 23ffab17 authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kalle Valo

rtlwifi: remove hal_op rx_command_packet

Because the hal_op rx_command_packet does C2H handler if rx packet type
is C2H, and the handler have been moved to base.c so we can call the
handler directly.
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent daf026ae
...@@ -830,8 +830,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) ...@@ -830,8 +830,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
goto new_trx_end; goto new_trx_end;
} }
/* handle command packet here */ /* handle command packet here */
if (rtlpriv->cfg->ops->rx_command_packet && if (stats.packet_report_type == C2H_PACKET) {
rtlpriv->cfg->ops->rx_command_packet(hw, &stats, skb)) { rtl_c2h_packet_handler(hw, skb->data, (u8)skb->len);
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
goto new_trx_end; goto new_trx_end;
} }
......
...@@ -250,7 +250,6 @@ static struct rtl_hal_ops rtl8192ee_hal_ops = { ...@@ -250,7 +250,6 @@ static struct rtl_hal_ops rtl8192ee_hal_ops = {
.set_rfreg = rtl92ee_phy_set_rf_reg, .set_rfreg = rtl92ee_phy_set_rf_reg,
.fill_h2c_cmd = rtl92ee_fill_h2c_cmd, .fill_h2c_cmd = rtl92ee_fill_h2c_cmd,
.get_btc_status = rtl92ee_get_btc_status, .get_btc_status = rtl92ee_get_btc_status,
.rx_command_packet = rtl92ee_rx_command_packet,
.c2h_content_parsing = rtl_c2h_content_parsing, .c2h_content_parsing = rtl_c2h_content_parsing,
.c2h_ra_report_handler = rtl92ee_c2h_ra_report_handler, .c2h_ra_report_handler = rtl92ee_c2h_ra_report_handler,
}; };
......
...@@ -1072,27 +1072,3 @@ bool rtl92ee_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index) ...@@ -1072,27 +1072,3 @@ bool rtl92ee_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index)
void rtl92ee_tx_polling(struct ieee80211_hw *hw, u8 hw_queue) void rtl92ee_tx_polling(struct ieee80211_hw *hw, u8 hw_queue)
{ {
} }
u32 rtl92ee_rx_command_packet(struct ieee80211_hw *hw,
const struct rtl_stats *status,
struct sk_buff *skb)
{
u32 result = 0;
struct rtl_priv *rtlpriv = rtl_priv(hw);
switch (status->packet_report_type) {
case NORMAL_RX:
result = 0;
break;
case C2H_PACKET:
rtl_c2h_packet_handler(hw, skb->data, (u8)skb->len);
result = 1;
break;
default:
RT_TRACE(rtlpriv, COMP_RECV, DBG_TRACE,
"Unknown packet type %d\n", status->packet_report_type);
break;
}
return result;
}
...@@ -762,7 +762,4 @@ void rtl92ee_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); ...@@ -762,7 +762,4 @@ void rtl92ee_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
void rtl92ee_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, void rtl92ee_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
bool firstseg, bool lastseg, bool firstseg, bool lastseg,
struct sk_buff *skb); struct sk_buff *skb);
u32 rtl92ee_rx_command_packet(struct ieee80211_hw *hw,
const struct rtl_stats *status,
struct sk_buff *skb);
#endif #endif
...@@ -261,7 +261,6 @@ static struct rtl_hal_ops rtl8723be_hal_ops = { ...@@ -261,7 +261,6 @@ static struct rtl_hal_ops rtl8723be_hal_ops = {
.set_rfreg = rtl8723be_phy_set_rf_reg, .set_rfreg = rtl8723be_phy_set_rf_reg,
.fill_h2c_cmd = rtl8723be_fill_h2c_cmd, .fill_h2c_cmd = rtl8723be_fill_h2c_cmd,
.get_btc_status = rtl8723be_get_btc_status, .get_btc_status = rtl8723be_get_btc_status,
.rx_command_packet = rtl8723be_rx_command_packet,
.is_fw_header = is_fw_header, .is_fw_header = is_fw_header,
.c2h_content_parsing = rtl_c2h_content_parsing, .c2h_content_parsing = rtl_c2h_content_parsing,
}; };
......
...@@ -761,27 +761,3 @@ void rtl8723be_tx_polling(struct ieee80211_hw *hw, u8 hw_queue) ...@@ -761,27 +761,3 @@ void rtl8723be_tx_polling(struct ieee80211_hw *hw, u8 hw_queue)
BIT(0) << (hw_queue)); BIT(0) << (hw_queue));
} }
} }
u32 rtl8723be_rx_command_packet(struct ieee80211_hw *hw,
const struct rtl_stats *status,
struct sk_buff *skb)
{
u32 result = 0;
struct rtl_priv *rtlpriv = rtl_priv(hw);
switch (status->packet_report_type) {
case NORMAL_RX:
result = 0;
break;
case C2H_PACKET:
rtl_c2h_packet_handler(hw, skb->data, (u8)skb->len);
result = 1;
break;
default:
RT_TRACE(rtlpriv, COMP_RECV, DBG_TRACE,
"No this packet type!!\n");
break;
}
return result;
}
...@@ -632,7 +632,4 @@ void rtl8723be_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); ...@@ -632,7 +632,4 @@ void rtl8723be_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
void rtl8723be_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, void rtl8723be_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
bool firstseg, bool lastseg, bool firstseg, bool lastseg,
struct sk_buff *skb); struct sk_buff *skb);
u32 rtl8723be_rx_command_packet(struct ieee80211_hw *hw,
const struct rtl_stats *status,
struct sk_buff *skb);
#endif #endif
...@@ -303,7 +303,6 @@ static struct rtl_hal_ops rtl8821ae_hal_ops = { ...@@ -303,7 +303,6 @@ static struct rtl_hal_ops rtl8821ae_hal_ops = {
.set_rfreg = rtl8821ae_phy_set_rf_reg, .set_rfreg = rtl8821ae_phy_set_rf_reg,
.fill_h2c_cmd = rtl8821ae_fill_h2c_cmd, .fill_h2c_cmd = rtl8821ae_fill_h2c_cmd,
.get_btc_status = rtl8821ae_get_btc_status, .get_btc_status = rtl8821ae_get_btc_status,
.rx_command_packet = rtl8821ae_rx_command_packet,
.c2h_content_parsing = rtl_c2h_content_parsing, .c2h_content_parsing = rtl_c2h_content_parsing,
.c2h_ra_report_handler = rtl8821ae_c2h_ra_report_handler, .c2h_ra_report_handler = rtl8821ae_c2h_ra_report_handler,
.add_wowlan_pattern = rtl8821ae_add_wowlan_pattern, .add_wowlan_pattern = rtl8821ae_add_wowlan_pattern,
......
...@@ -1005,29 +1005,3 @@ void rtl8821ae_tx_polling(struct ieee80211_hw *hw, u8 hw_queue) ...@@ -1005,29 +1005,3 @@ void rtl8821ae_tx_polling(struct ieee80211_hw *hw, u8 hw_queue)
BIT(0) << (hw_queue)); BIT(0) << (hw_queue));
} }
} }
u32 rtl8821ae_rx_command_packet(struct ieee80211_hw *hw,
const struct rtl_stats *status,
struct sk_buff *skb)
{
u32 result = 0;
struct rtl_priv *rtlpriv = rtl_priv(hw);
switch (status->packet_report_type) {
case NORMAL_RX:
result = 0;
break;
case C2H_PACKET:
rtl_c2h_packet_handler(hw, skb->data, (u8)skb->len);
result = 1;
RT_TRACE(rtlpriv, COMP_RECV, DBG_LOUD,
"skb->len=%d\n\n", skb->len);
break;
default:
RT_TRACE(rtlpriv, COMP_RECV, DBG_LOUD,
"No this packet type!!\n");
break;
}
return result;
}
...@@ -628,7 +628,4 @@ void rtl8821ae_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); ...@@ -628,7 +628,4 @@ void rtl8821ae_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
void rtl8821ae_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, void rtl8821ae_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
bool firstseg, bool lastseg, bool firstseg, bool lastseg,
struct sk_buff *skb); struct sk_buff *skb);
u32 rtl8821ae_rx_command_packet(struct ieee80211_hw *hw,
const struct rtl_stats *status,
struct sk_buff *skb);
#endif #endif
...@@ -2340,8 +2340,6 @@ struct rtl_hal_ops { ...@@ -2340,8 +2340,6 @@ struct rtl_hal_ops {
void (*set_default_port_id_cmd)(struct ieee80211_hw *hw); void (*set_default_port_id_cmd)(struct ieee80211_hw *hw);
bool (*get_btc_status) (void); bool (*get_btc_status) (void);
bool (*is_fw_header)(struct rtlwifi_firmware_header *hdr); bool (*is_fw_header)(struct rtlwifi_firmware_header *hdr);
u32 (*rx_command_packet)(struct ieee80211_hw *hw,
const struct rtl_stats *status, struct sk_buff *skb);
void (*add_wowlan_pattern)(struct ieee80211_hw *hw, void (*add_wowlan_pattern)(struct ieee80211_hw *hw,
struct rtl_wow_pattern *rtl_pattern, struct rtl_wow_pattern *rtl_pattern,
u8 index); u8 index);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment