From: Kalle Valo <kvalo@qca.qualcomm.com>
To: <linville@tuxdriver.com>
Cc: <linux-wireless@vger.kernel.org>,
Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Subject: [PATCH 19/31] ath6kl: Move scatter information from ath6kl_device to htc_target
Date: Fri, 22 Jul 2011 08:41:52 +0300 [thread overview]
Message-ID: <1311313324-6766-21-git-send-email-kvalo@qca.qualcomm.com> (raw)
In-Reply-To: <1311313324-6766-1-git-send-email-kvalo@qca.qualcomm.com>
From: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/hif-ops.h | 5 ++---
drivers/net/wireless/ath/ath6kl/hif.h | 8 +-------
drivers/net/wireless/ath/ath6kl/htc.c | 13 ++++---------
drivers/net/wireless/ath/ath6kl/htc.h | 3 +++
drivers/net/wireless/ath/ath6kl/htc_hif.h | 1 -
drivers/net/wireless/ath/ath6kl/sdio.c | 12 ++++++------
6 files changed, 16 insertions(+), 26 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/hif-ops.h b/drivers/net/wireless/ath/ath6kl/hif-ops.h
index 32890cd..c923979 100644
--- a/drivers/net/wireless/ath/ath6kl/hif-ops.h
+++ b/drivers/net/wireless/ath/ath6kl/hif-ops.h
@@ -53,10 +53,9 @@ static inline void hif_scatter_req_add(struct ath6kl *ar,
return ar->hif_ops->scatter_req_add(ar, s_req);
}
-static inline int ath6kl_hif_enable_scatter(struct ath6kl *ar,
- struct hif_dev_scat_sup_info *info)
+static inline int ath6kl_hif_enable_scatter(struct ath6kl *ar)
{
- return ar->hif_ops->enable_scatter(ar, info);
+ return ar->hif_ops->enable_scatter(ar);
}
static inline int ath6kl_hif_scat_req_rw(struct ath6kl *ar,
diff --git a/drivers/net/wireless/ath/ath6kl/hif.h b/drivers/net/wireless/ath/ath6kl/hif.h
index abb1095..dcbecc9 100644
--- a/drivers/net/wireless/ath/ath6kl/hif.h
+++ b/drivers/net/wireless/ath/ath6kl/hif.h
@@ -184,11 +184,6 @@ struct hif_scatter_req {
struct hif_scatter_item scat_list[1];
};
-struct hif_dev_scat_sup_info {
- int max_scat_entries;
- int max_xfer_szper_scatreq;
-};
-
struct ath6kl_hif_ops {
int (*read_write_sync)(struct ath6kl *ar, u32 addr, u8 *buf,
u32 len, u32 request);
@@ -201,8 +196,7 @@ struct ath6kl_hif_ops {
struct hif_scatter_req *(*scatter_req_get)(struct ath6kl *ar);
void (*scatter_req_add)(struct ath6kl *ar,
struct hif_scatter_req *s_req);
- int (*enable_scatter)(struct ath6kl *ar,
- struct hif_dev_scat_sup_info *info);
+ int (*enable_scatter)(struct ath6kl *ar);
int (*scat_req_rw) (struct ath6kl *ar,
struct hif_scatter_req *scat_req);
void (*cleanup_scatter)(struct ath6kl *ar);
diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index ce5c082..ea87a19 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -432,11 +432,8 @@ static void htc_issue_send_bundle(struct htc_endpoint *endpoint,
{
struct htc_target *target = endpoint->target;
struct hif_scatter_req *scat_req = NULL;
- struct hif_dev_scat_sup_info hif_info;
int n_scat, n_sent_bundle = 0, tot_pkts_bundle = 0;
- hif_info = target->dev->hif_scat_info;
-
while (true) {
n_scat = get_queue_depth(queue);
n_scat = min(n_scat, target->msg_per_bndl_max);
@@ -2168,19 +2165,17 @@ int htc_get_rxbuf_num(struct htc_target *target, enum htc_endpoint_id endpoint)
static void htc_setup_msg_bndl(struct htc_target *target)
{
- struct hif_dev_scat_sup_info *scat_info = &target->dev->hif_scat_info;
-
/* limit what HTC can handle */
target->msg_per_bndl_max = min(HTC_HOST_MAX_MSG_PER_BUNDLE,
target->msg_per_bndl_max);
- if (ath6kl_hif_enable_scatter(target->dev->ar, scat_info)) {
+ if (ath6kl_hif_enable_scatter(target->dev->ar)) {
target->msg_per_bndl_max = 0;
return;
}
/* limit bundle what the device layer can handle */
- target->msg_per_bndl_max = min(scat_info->max_scat_entries,
+ target->msg_per_bndl_max = min(target->max_scat_entries,
target->msg_per_bndl_max);
ath6kl_dbg(ATH6KL_DBG_TRC,
@@ -2188,10 +2183,10 @@ static void htc_setup_msg_bndl(struct htc_target *target)
target->msg_per_bndl_max);
/* Max rx bundle size is limited by the max tx bundle size */
- target->max_rx_bndl_sz = scat_info->max_xfer_szper_scatreq;
+ target->max_rx_bndl_sz = target->max_xfer_szper_scatreq;
/* Max tx bundle size if limited by the extended mbox address range */
target->max_tx_bndl_sz = min(HIF_MBOX0_EXT_WIDTH,
- scat_info->max_xfer_szper_scatreq);
+ target->max_xfer_szper_scatreq);
ath6kl_dbg(ATH6KL_DBG_ANY, "max recv: %d max send: %d\n",
target->max_rx_bndl_sz, target->max_tx_bndl_sz);
diff --git a/drivers/net/wireless/ath/ath6kl/htc.h b/drivers/net/wireless/ath/ath6kl/htc.h
index 26e6b93..bf9c725 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.h
+++ b/drivers/net/wireless/ath/ath6kl/htc.h
@@ -533,6 +533,9 @@ struct htc_target {
u32 block_sz;
u32 block_mask;
+
+ int max_scat_entries;
+ int max_xfer_szper_scatreq;
};
void *htc_create(struct ath6kl *ar);
diff --git a/drivers/net/wireless/ath/ath6kl/htc_hif.h b/drivers/net/wireless/ath/ath6kl/htc_hif.h
index cf5bee0..47f086c 100644
--- a/drivers/net/wireless/ath/ath6kl/htc_hif.h
+++ b/drivers/net/wireless/ath/ath6kl/htc_hif.h
@@ -80,7 +80,6 @@ struct ath6kl_device {
struct ath6kl_irq_enable_reg irq_en_reg;
u8 pad3[A_CACHE_LINE_PAD];
struct htc_target *htc_cnxt;
- struct hif_dev_scat_sup_info hif_scat_info;
int chk_irq_status_cnt;
struct ath6kl *ar;
};
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index 44ac68e..3417160 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -663,10 +663,10 @@ static void ath6kl_sdio_cleanup_scatter(struct ath6kl *ar)
}
/* setup of HIF scatter resources */
-static int ath6kl_sdio_enable_scatter(struct ath6kl *ar,
- struct hif_dev_scat_sup_info *pinfo)
+static int ath6kl_sdio_enable_scatter(struct ath6kl *ar)
{
struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar);
+ struct htc_target *target = ar->htc_target;
int ret;
bool virt_scat = false;
@@ -689,8 +689,8 @@ static int ath6kl_sdio_enable_scatter(struct ath6kl *ar,
MAX_SCATTER_REQUESTS,
MAX_SCATTER_ENTRIES_PER_REQ);
- pinfo->max_scat_entries = MAX_SCATTER_ENTRIES_PER_REQ;
- pinfo->max_xfer_szper_scatreq =
+ target->max_scat_entries = MAX_SCATTER_ENTRIES_PER_REQ;
+ target->max_xfer_szper_scatreq =
MAX_SCATTER_REQ_TRANSFER_SIZE;
} else {
ath6kl_sdio_cleanup_scatter(ar);
@@ -713,8 +713,8 @@ static int ath6kl_sdio_enable_scatter(struct ath6kl *ar,
"Vitual scatter enabled, max_scat_req:%d, entries:%d\n",
ATH6KL_SCATTER_REQS, ATH6KL_SCATTER_ENTRIES_PER_REQ);
- pinfo->max_scat_entries = ATH6KL_SCATTER_ENTRIES_PER_REQ;
- pinfo->max_xfer_szper_scatreq =
+ target->max_scat_entries = ATH6KL_SCATTER_ENTRIES_PER_REQ;
+ target->max_xfer_szper_scatreq =
ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER;
}
--
1.7.1
next prev parent reply other threads:[~2011-07-22 5:43 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-22 5:41 [PATCH 00/31] ath6kl: pending patches from ath6kl-cleanup Kalle Valo
2011-07-22 5:41 ` [PATCH 00/31] *** SUBJECT HERE *** Kalle Valo
2011-07-22 5:53 ` Kalle Valo
2011-07-22 13:40 ` John W. Linville
2011-07-22 5:41 ` [PATCH 01/31] ath6kl: cleanup callbacks for different scatter gather method Kalle Valo
2011-07-22 5:41 ` [PATCH 02/31] ath6kl: Move ath6kl_sdio_async_rw_scatter() down to other hif_ops functions Kalle Valo
2011-07-22 5:41 ` [PATCH 03/31] ath6kl: Remove struct hif_scatter_req_priv Kalle Valo
2011-07-22 5:41 ` [PATCH 04/31] ath6kl: Remove useless flags in hif_scatter_req Kalle Valo
2011-07-22 5:41 ` [PATCH 05/31] ath6kl: Remove endpoint reference from hif_scatter_req Kalle Valo
2011-07-22 5:41 ` [PATCH 06/31] ath6kl: Refactor refactor ath6kl_sdio_setup_scat_resource() Kalle Valo
2011-07-22 5:41 ` [PATCH 07/31] ath6kl: Cleanup ath6kl_sdio_enable_scatter() Kalle Valo
2011-07-22 5:41 ` [PATCH 08/31] ath6kl: Cleanup ath6kl_sdio_cleanup_scatter() Kalle Valo
2011-07-22 5:41 ` [PATCH 09/31] ath6kl: Move down scatter enable and cleanup functions Kalle Valo
2011-07-22 5:41 ` [PATCH 10/31] ath6kl: Merge scatter gather setup functions for two method Kalle Valo
2011-07-22 5:41 ` [PATCH 11/31] ath6kl: Moe virt_scat from hif_dev_scat_sup_info to hif_scatter_req Kalle Valo
2011-07-22 5:41 ` [PATCH 12/31] ath6kl: Refactor ath6kl_sdio_read_write_sync() Kalle Valo
2011-07-22 5:41 ` [PATCH 13/31] ath6kl: Merge scatter rw request functions into one Kalle Valo
2011-07-22 5:41 ` [PATCH 14/31] ath6kl: Remove ath6kldev_setup_msg_bndl() Kalle Valo
2011-07-22 5:41 ` [PATCH 15/31] ath6kl: Minor cleanup in ath6kldev_submit_scat_req() Kalle Valo
2011-07-22 5:41 ` [PATCH 16/31] ath6kl: Remove callback msg_pending() and used the function directly Kalle Valo
2011-07-22 5:41 ` [PATCH 17/31] ath6kl: Move bundle size from ath6kl_device to htc_target Kalle Valo
2011-07-22 5:41 ` [PATCH 18/31] ath6kl: Move block_sz and block_mask " Kalle Valo
2011-07-22 5:41 ` Kalle Valo [this message]
2011-07-22 5:41 ` [PATCH 20/31] ath6kl: Bypass reading irq status based on chk_irq_status_cnt Kalle Valo
2011-07-22 5:41 ` [PATCH 21/31] ath6kl: Move chk_irq_status_cnt from ath6kl_device to htc_target Kalle Valo
2011-07-22 5:41 ` [PATCH 22/31] ath6kl: Remove unused struct ath6kl_async_reg_io_buffer Kalle Valo
2011-07-22 5:41 ` [PATCH 23/31] ath6kl: Print bad trailer data only when htc fails to parse trailer info Kalle Valo
2011-07-22 5:41 ` [PATCH 24/31] ath6kl: Rearrange the variable and the value position in IF condition Kalle Valo
2011-07-22 5:41 ` [PATCH 25/31] ath6kl: Avoid two memset to clear src and desr mac addr variable memory in ath6kl_wmi_dot11_hdr_remove() Kalle Valo
2011-07-22 5:41 ` [PATCH 26/31] ath6kl: Use bit field macros to maintain wlan enabled and disabled status Kalle Valo
2011-07-22 5:42 ` [PATCH 27/31] ath6kl: don't force foreground scan when connected Kalle Valo
2011-07-22 5:42 ` [PATCH 28/31] ath6kl: fix atomicity in ath6kl_cfg80211_scan_node() Kalle Valo
2011-07-22 5:42 ` [PATCH 29/31] ath6kl: fix crash when interface is closed but scan is ongoing Kalle Valo
2011-07-22 5:42 ` [PATCH 30/31] ath6kl: remove dependency to wireless extensions Kalle Valo
2011-07-22 5:42 ` [PATCH 31/31] ath6kl: change aggreation timeout message from an error to a debug message Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1311313324-6766-21-git-send-email-kvalo@qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=vthiagar@qca.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).