From: Johannes Berg Date: Mon, 5 Mar 2012 19:24:43 +0000 (-0800) Subject: iwlwifi: iwl_rx_cmd_buffer belongs to transport API X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=930dfd5f20eba2cef41cdb2db04108b359b97594;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git iwlwifi: iwl_rx_cmd_buffer belongs to transport API This is how the transport passes things up into higher layers, so it belongs to the transport API. Signed-off-by: Johannes Berg Signed-off-by: Wey-Yi Guy Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h index 787d726efbc8..2b9d21a7207d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-shared.h +++ b/drivers/net/wireless/iwlwifi/iwl-shared.h @@ -67,7 +67,6 @@ #include #include #include -#include /* for page_address */ #include #include "iwl-commands.h" @@ -413,22 +412,6 @@ static inline bool iwl_have_debug_level(u32 level) return iwlagn_mod_params.debug_level & level; } -struct iwl_rx_cmd_buffer { - struct page *_page; -}; - -static inline void *rxb_addr(struct iwl_rx_cmd_buffer *r) -{ - return page_address(r->_page); -} - -static inline struct page *rxb_steal_page(struct iwl_rx_cmd_buffer *r) -{ - struct page *p = r->_page; - r->_page = NULL; - return p; -} - /* * mac80211 queues, ACs, hardware queues, FIFOs. * diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index 0197f31f3bec..b09192a028de 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h @@ -64,6 +64,7 @@ #define __iwl_trans_h__ #include +#include /* for page_address */ #include "iwl-shared.h" #include "iwl-debug.h" @@ -201,6 +202,22 @@ static inline void iwl_free_resp(struct iwl_host_cmd *cmd) free_pages(cmd->_rx_page_addr, cmd->_rx_page_order); } +struct iwl_rx_cmd_buffer { + struct page *_page; +}; + +static inline void *rxb_addr(struct iwl_rx_cmd_buffer *r) +{ + return page_address(r->_page); +} + +static inline struct page *rxb_steal_page(struct iwl_rx_cmd_buffer *r) +{ + struct page *p = r->_page; + r->_page = NULL; + return p; +} + /** * struct iwl_trans_ops - transport specific operations *