iwlagn: move iwl_free_pages to iwl-shared.h
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Fri, 26 Aug 2011 06:11:05 +0000 (23:11 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 29 Aug 2011 19:25:35 +0000 (15:25 -0400)
This helper is used by the transport and the upper layer.
Kill __iwl_free_pages which was used in the transport only.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-dev.h
drivers/net/wireless/iwlwifi/iwl-scan.c
drivers/net/wireless/iwlwifi/iwl-shared.h
drivers/net/wireless/iwlwifi/iwl-sta.c
drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
drivers/net/wireless/iwlwifi/iwl-trans.c

index ab9816aeb40a65c587ca320f70d0342230f70a63..eac25c507d30605539ccef7f534afdfd423278e5 100644 (file)
@@ -1505,13 +1505,4 @@ static inline int is_channel_ibss(const struct iwl_channel_info *ch)
        return ((ch->flags & EEPROM_CHANNEL_IBSS)) ? 1 : 0;
 }
 
-static inline void __iwl_free_pages(struct iwl_priv *priv, struct page *page)
-{
-       __free_pages(page, hw_params(priv).rx_page_order);
-}
-
-static inline void iwl_free_pages(struct iwl_priv *priv, unsigned long page)
-{
-       free_pages(page, hw_params(priv).rx_page_order);
-}
 #endif                         /* __iwl_dev_h__ */
index 2bb94f7351c974503b3dca72149dd3f251fae81f..fc5af3475392b7bf897844afe54f241b10def001 100644 (file)
@@ -91,7 +91,7 @@ static int iwl_send_scan_abort(struct iwl_priv *priv)
                ret = -EIO;
        }
 
-       iwl_free_pages(priv, cmd.reply_page);
+       iwl_free_pages(priv->shrd, cmd.reply_page);
        return ret;
 }
 
index ff4c04fee4296e0e4c5e6357189bf39b15c1e026..1229eb3c098cb18bc2c0cfb2f7318ce37b14e0e8 100644 (file)
@@ -229,6 +229,11 @@ static inline u32 iwl_get_debug_level(struct iwl_shared *shrd)
 }
 #endif
 
+static inline void iwl_free_pages(struct iwl_shared *shrd, unsigned long page)
+{
+       free_pages(page, shrd->hw_params.rx_page_order);
+}
+
 struct iwl_rx_mem_buffer {
        dma_addr_t page_dma;
        struct page *page;
index 1154e48430878fc7c125a1385488a954b600479c..26b2bd4db6b4d6fd0823372544473de8dad22f88 100644 (file)
@@ -177,7 +177,7 @@ int iwl_send_add_sta(struct iwl_priv *priv,
                pkt = (struct iwl_rx_packet *)cmd.reply_page;
                ret = iwl_process_add_sta_resp(priv, sta, pkt, true);
        }
-       iwl_free_pages(priv, cmd.reply_page);
+       iwl_free_pages(priv->shrd, cmd.reply_page);
 
        return ret;
 }
@@ -455,7 +455,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv,
                        break;
                }
        }
-       iwl_free_pages(priv, cmd.reply_page);
+       iwl_free_pages(priv->shrd, cmd.reply_page);
 
        return ret;
 }
index ac2fae12707a07ae2a724a5103e5dd8f7b4e353d..ed497247f97e1be120c497ca5e692ff4cd432183 100644 (file)
@@ -1023,7 +1023,7 @@ cancel:
        }
 fail:
        if (cmd->reply_page) {
-               iwl_free_pages(priv, cmd->reply_page);
+               iwl_free_pages(priv->shrd, cmd->reply_page);
                cmd->reply_page = 0;
        }
 
index b080e69374ea55c74e28eb221bdc1697d9cd3bf3..89560089a34891c25094b7235d7a04ba2a445aa4 100644 (file)
@@ -129,7 +129,8 @@ static void iwl_trans_rxq_free_rx_bufs(struct iwl_trans *trans)
                        dma_unmap_page(bus(trans)->dev, rxq->pool[i].page_dma,
                                PAGE_SIZE << hw_params(trans).rx_page_order,
                                DMA_FROM_DEVICE);
-                       __iwl_free_pages(priv(trans), rxq->pool[i].page);
+                       __free_pages(rxq->pool[i].page,
+                                    hw_params(trans).rx_page_order);
                        rxq->pool[i].page = NULL;
                }
                list_add_tail(&rxq->pool[i].list, &rxq->rx_used);