Commit 26a309c7 authored by Igal Chernobelsky's avatar Igal Chernobelsky Committed by Luciano Coelho
Browse files

wlcore/wl18xx/wl12xx: aggregation buffer size set



Aggregation buffer size is set separately per 18xx/12xx chip family.
For 18xx aggragation buffer is set to 13 pages to utilize all
the available tx/rx descriptors for aggregation.

[Arik - remove redundant parts from the patch]

Signed-off-by: default avatarIgal Chernobelsky <igalc@ti.com>
Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
Signed-off-by: default avatarLuciano Coelho <luca@coelho.fi>
parent f1c434df
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1630,7 +1630,7 @@ static int __devinit wl12xx_probe(struct platform_device *pdev)
	struct ieee80211_hw *hw;
	struct wl12xx_priv *priv;

	hw = wlcore_alloc_hw(sizeof(*priv));
	hw = wlcore_alloc_hw(sizeof(*priv), WL12XX_AGGR_BUFFER_SIZE);
	if (IS_ERR(hw)) {
		wl1271_error("can't allocate hw");
		return PTR_ERR(hw);
+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@
#define WL128X_SUBTYPE_VER	2
#define WL128X_MINOR_VER	115

#define WL12XX_AGGR_BUFFER_SIZE	(4 * PAGE_SIZE)

#define WL12XX_NUM_TX_DESCRIPTORS 16
#define WL12XX_NUM_RX_DESCRIPTORS 8

+1 −1
Original line number Diff line number Diff line
@@ -1380,7 +1380,7 @@ static int __devinit wl18xx_probe(struct platform_device *pdev)
	struct wl18xx_priv *priv;
	int ret;

	hw = wlcore_alloc_hw(sizeof(*priv));
	hw = wlcore_alloc_hw(sizeof(*priv), WL18XX_AGGR_BUFFER_SIZE);
	if (IS_ERR(hw)) {
		wl1271_error("can't allocate hw");
		ret = PTR_ERR(hw);
+2 −0
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@

#define WL18XX_CMD_MAX_SIZE          740

#define WL18XX_AGGR_BUFFER_SIZE		(13 * PAGE_SIZE)

#define WL18XX_NUM_TX_DESCRIPTORS 32
#define WL18XX_NUM_RX_DESCRIPTORS 32

+4 −4
Original line number Diff line number Diff line
@@ -5313,7 +5313,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)

#define WL1271_DEFAULT_CHANNEL 0

struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size)
struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size, u32 aggr_buf_size)
{
	struct ieee80211_hw *hw;
	struct wl1271 *wl;
@@ -5398,12 +5398,13 @@ struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size)
	mutex_init(&wl->mutex);
	mutex_init(&wl->flush_mutex);

	order = get_order(WL1271_AGGR_BUFFER_SIZE);
	order = get_order(aggr_buf_size);
	wl->aggr_buf = (u8 *)__get_free_pages(GFP_KERNEL, order);
	if (!wl->aggr_buf) {
		ret = -ENOMEM;
		goto err_wq;
	}
	wl->aggr_buf_size = aggr_buf_size;

	wl->dummy_packet = wl12xx_alloc_dummy_packet(wl);
	if (!wl->dummy_packet) {
@@ -5466,8 +5467,7 @@ int wlcore_free_hw(struct wl1271 *wl)
	device_remove_file(wl->dev, &dev_attr_bt_coex_state);
	free_page((unsigned long)wl->fwlog);
	dev_kfree_skb(wl->dummy_packet);
	free_pages((unsigned long)wl->aggr_buf,
			get_order(WL1271_AGGR_BUFFER_SIZE));
	free_pages((unsigned long)wl->aggr_buf, get_order(wl->aggr_buf_size));

	wl1271_debugfs_exit(wl);

Loading