Commit d13f1862 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Johannes Berg

iwlwifi: provide RX page order

When the pages are to be used by front-end, it may need
to know the page order, provide it.
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 128e63ef
...@@ -274,6 +274,7 @@ struct iwl_rx_cmd_buffer { ...@@ -274,6 +274,7 @@ struct iwl_rx_cmd_buffer {
struct page *_page; struct page *_page;
int _offset; int _offset;
bool _page_stolen; bool _page_stolen;
u32 _rx_page_order;
unsigned int truesize; unsigned int truesize;
}; };
...@@ -294,6 +295,11 @@ static inline struct page *rxb_steal_page(struct iwl_rx_cmd_buffer *r) ...@@ -294,6 +295,11 @@ static inline struct page *rxb_steal_page(struct iwl_rx_cmd_buffer *r)
return r->_page; return r->_page;
} }
static inline void iwl_free_rxb(struct iwl_rx_cmd_buffer *r)
{
__free_pages(r->_page, r->_rx_page_order);
}
#define MAX_NO_RECLAIM_CMDS 6 #define MAX_NO_RECLAIM_CMDS 6
#define IWL_MASK(lo, hi) ((1 << (hi)) | ((1 << (hi)) - (1 << (lo)))) #define IWL_MASK(lo, hi) ((1 << (hi)) | ((1 << (hi)) - (1 << (lo))))
......
...@@ -594,6 +594,7 @@ static void iwl_pcie_rx_handle_rb(struct iwl_trans *trans, ...@@ -594,6 +594,7 @@ static void iwl_pcie_rx_handle_rb(struct iwl_trans *trans,
int index, cmd_index, err, len; int index, cmd_index, err, len;
struct iwl_rx_cmd_buffer rxcb = { struct iwl_rx_cmd_buffer rxcb = {
._offset = offset, ._offset = offset,
._rx_page_order = trans_pcie->rx_page_order,
._page = rxb->page, ._page = rxb->page,
._page_stolen = false, ._page_stolen = false,
.truesize = max_len, .truesize = max_len,
......
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