Commit 790428b6 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by John W. Linville
Browse files

iwlagn: move iwl_free_pages to iwl-shared.h



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: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 845a9c0d
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -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__ */
+1 −1
Original line number Diff line number Diff line
@@ -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;
}

+5 −0
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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;
}
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}

Loading