From 9ae6ed271a60f0e4476fe94f0efc5aba184a9c57 Mon Sep 17 00:00:00 2001 From: Ping-Ke Shih Date: Fri, 18 May 2018 17:30:05 +0800 Subject: rtlwifi: use sk_buff to queue C2H commands We use 'struct rtl_c2hcmd' to store C2H commands originally, and the code is slightly complex to enqueue and dequeue and also wastes time to allocate and memcpy data. Since C2H commands are asynchronous events, they can be processed in work queue, so RX ISR enqueues C2H result in removal of rtl_c2h_packet_handler(). Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo --- drivers/net/wireless/realtek/rtlwifi/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/net/wireless/realtek/rtlwifi/pci.c') diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c index dd51c67c09fa..ae13bcfb3bf0 100644 --- a/drivers/net/wireless/realtek/rtlwifi/pci.c +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c @@ -831,8 +831,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) } /* handle command packet here */ if (stats.packet_report_type == C2H_PACKET) { - rtl_c2h_packet_handler(hw, skb->data, (u8)skb->len); - dev_kfree_skb_any(skb); + rtl_c2hcmd_enqueue(hw, skb); goto new_trx_end; } -- cgit v1.2.3