* [ath9k-devel] [PATCH 1/3] ath10k: kill CE_SEND_CB/CE_RECV_CB
@ 2013-04-18 7:44 Janusz Dziedzic
2013-04-18 7:45 ` [ath9k-devel] [PATCH 2/3] ath10k: kill WARN_ON in ce.c Janusz Dziedzic
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Janusz Dziedzic @ 2013-04-18 7:44 UTC (permalink / raw)
To: ath9k-devel
kill typedefs
CE_SEND_CB/CE_RECV_CB
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
drivers/net/wireless/ath/ath10k/ce.c | 17 ++++++++++----
drivers/net/wireless/ath/ath10k/ce.h | 43 +++++++++++++++++-----------------
2 files changed, 35 insertions(+), 25 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index c7a96c0..3fd4fce 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -667,26 +667,35 @@ void ath10k_ce_disable_interrupts(struct ath10k *ar)
}
void ath10k_ce_send_cb_register(struct ce_state *ce_state,
- CE_SEND_CB fn_ptr,
+ void (*send_cb) (struct ce_state *ce_state,
+ void *per_transfer_send_context,
+ u32 buffer,
+ unsigned int nbytes,
+ unsigned int transfer_id),
int disable_interrupts)
{
struct ath10k *ar = ce_state->ar;
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
spin_lock_bh(&ar_pci->ce_lock);
- ce_state->send_cb = fn_ptr;
+ ce_state->send_cb = send_cb;
ath10k_ce_per_engine_handler_adjust(ce_state, disable_interrupts);
spin_unlock_bh(&ar_pci->ce_lock);
}
void ath10k_ce_recv_cb_register(struct ce_state *ce_state,
- CE_RECV_CB fn_ptr)
+ void (*recv_cb) (struct ce_state *ce_state,
+ void *per_transfer_recv_context,
+ u32 buffer,
+ unsigned int nbytes,
+ unsigned int transfer_id,
+ unsigned int flags))
{
struct ath10k *ar = ce_state->ar;
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
spin_lock_bh(&ar_pci->ce_lock);
- ce_state->recv_cb = fn_ptr;
+ ce_state->recv_cb = recv_cb;
ath10k_ce_per_engine_handler_adjust(ce_state, 0);
spin_unlock_bh(&ar_pci->ce_lock);
}
diff --git a/drivers/net/wireless/ath/ath10k/ce.h b/drivers/net/wireless/ath/ath10k/ce.h
index 484fba3..8beb606 100644
--- a/drivers/net/wireless/ath/ath10k/ce.h
+++ b/drivers/net/wireless/ath/ath10k/ce.h
@@ -38,23 +38,6 @@
struct ce_state;
-/*
- * Pops 1 completed send buffer from Source ring.
- */
-typedef void (*CE_SEND_CB) (struct ce_state *ce_state,
- void *per_transfer_send_context,
- u32 buffer,
- unsigned int nbytes,
- unsigned int transfer_id);
-/*
- * Pops 1 completed send buffer from Destination ring.
- */
-typedef void (*CE_RECV_CB) (struct ce_state *ce_state,
- void *per_transfer_recv_context,
- u32 buffer,
- unsigned int nbytes,
- unsigned int transfer_id,
- unsigned int flags);
/* Copy Engine operational state */
enum ce_op_state {
@@ -144,8 +127,17 @@ struct ce_state {
u32 ctrl_addr;
enum ce_op_state state;
- CE_SEND_CB send_cb;
- CE_RECV_CB recv_cb;
+ void (*send_cb) (struct ce_state *ce_state,
+ void *per_transfer_send_context,
+ u32 buffer,
+ unsigned int nbytes,
+ unsigned int transfer_id);
+ void (*recv_cb) (struct ce_state *ce_state,
+ void *per_transfer_recv_context,
+ u32 buffer,
+ unsigned int nbytes,
+ unsigned int transfer_id,
+ unsigned int flags);
unsigned int src_sz_max;
struct ce_ring_state *src_ring;
@@ -200,7 +192,11 @@ int ath10k_ce_send(struct ce_state *ce_state,
unsigned int flags);
void ath10k_ce_send_cb_register(struct ce_state *ce_state,
- CE_SEND_CB fn_ptr,
+ void (*send_cb) (struct ce_state *ce_state,
+ void *per_transfer_send_context,
+ u32 buffer,
+ unsigned int nbytes,
+ unsigned int transfer_id),
int disable_interrupts);
/* Append a simple buffer (address/length) to a sendlist. */
@@ -243,7 +239,12 @@ int ath10k_ce_recv_buf_enqueue(struct ce_state *ce_state,
u32 buffer);
void ath10k_ce_recv_cb_register(struct ce_state *ce_state,
- CE_RECV_CB fn_ptr);
+ void (*recv_cb) (struct ce_state *ce_state,
+ void *per_transfer_recv_context,
+ u32 buffer,
+ unsigned int nbytes,
+ unsigned int transfer_id,
+ unsigned int flags));
/* recv flags */
/* Data is byte-swapped */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [ath9k-devel] [PATCH 2/3] ath10k: kill WARN_ON in ce.c
2013-04-18 7:44 [ath9k-devel] [PATCH 1/3] ath10k: kill CE_SEND_CB/CE_RECV_CB Janusz Dziedzic
@ 2013-04-18 7:45 ` Janusz Dziedzic
2013-04-18 7:45 ` [ath9k-devel] [PATCH 3/3] ath10k: kill MAX_SSID_LEN define Janusz Dziedzic
2013-04-18 10:41 ` [ath9k-devel] [PATCH 1/3] ath10k: kill CE_SEND_CB/CE_RECV_CB Kalle Valo
2 siblings, 0 replies; 4+ messages in thread
From: Janusz Dziedzic @ 2013-04-18 7:45 UTC (permalink / raw)
To: ath9k-devel
Kill WARN_ON in ce.c, use ath10k_warn() instead.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
drivers/net/wireless/ath/ath10k/ce.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index 3fd4fce..27b27de 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -82,7 +82,9 @@ static int ath10k_ce_send_nolock(struct ce_state *ce_state,
u32 desc_flags = 0;
int ret = 0;
- WARN_ON(nbytes > ce_state->src_sz_max);
+ if (nbytes > ce_state->src_sz_max)
+ ath10k_warn("%s: send more we can (nbytes: %d, max: %d)\n",
+ __func__, nbytes, ce_state->src_sz_max);
TARGET_ACCESS_BEGIN(ar);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [ath9k-devel] [PATCH 3/3] ath10k: kill MAX_SSID_LEN define
2013-04-18 7:44 [ath9k-devel] [PATCH 1/3] ath10k: kill CE_SEND_CB/CE_RECV_CB Janusz Dziedzic
2013-04-18 7:45 ` [ath9k-devel] [PATCH 2/3] ath10k: kill WARN_ON in ce.c Janusz Dziedzic
@ 2013-04-18 7:45 ` Janusz Dziedzic
2013-04-18 10:41 ` [ath9k-devel] [PATCH 1/3] ath10k: kill CE_SEND_CB/CE_RECV_CB Kalle Valo
2 siblings, 0 replies; 4+ messages in thread
From: Janusz Dziedzic @ 2013-04-18 7:45 UTC (permalink / raw)
To: ath9k-devel
Use IEEE80211_MAX_SSID_LEN instead.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
drivers/net/wireless/ath/ath10k/core.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 193ac31..402cddb 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -34,7 +34,6 @@
#define SM(_v, _f) (((_v) << _f##_LSB) & _f##_MASK)
#define WO(_f) ((_f##_OFFSET) >> 2)
-#define MAX_SSID_LEN 32
#define ATH10K_SCAN_ID 0
#define WMI_READY_TIMEOUT (5 * HZ)
#define ATH10K_FLUSH_TIMEOUT_HZ (5*HZ)
@@ -216,7 +215,7 @@ struct ath10k_vif {
u8 tim_bitmap[16];
u8 tim_len;
u32 ssid_len;
- u8 ssid[MAX_SSID_LEN];
+ u8 ssid[IEEE80211_MAX_SSID_LEN];
bool hidden_ssid;
/* P2P_IE with NoA attribute for P2P_GO case */
u32 noa_len;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [ath9k-devel] [PATCH 1/3] ath10k: kill CE_SEND_CB/CE_RECV_CB
2013-04-18 7:44 [ath9k-devel] [PATCH 1/3] ath10k: kill CE_SEND_CB/CE_RECV_CB Janusz Dziedzic
2013-04-18 7:45 ` [ath9k-devel] [PATCH 2/3] ath10k: kill WARN_ON in ce.c Janusz Dziedzic
2013-04-18 7:45 ` [ath9k-devel] [PATCH 3/3] ath10k: kill MAX_SSID_LEN define Janusz Dziedzic
@ 2013-04-18 10:41 ` Kalle Valo
2 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2013-04-18 10:41 UTC (permalink / raw)
To: ath9k-devel
Janusz Dziedzic <janusz.dziedzic@tieto.com> writes:
> kill typedefs
> CE_SEND_CB/CE_RECV_CB
>
> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Thanks, all three patches applied. Patch 2 had conflicts, please check I
didn't break anything.
--
Kalle Valo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-18 10:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18 7:44 [ath9k-devel] [PATCH 1/3] ath10k: kill CE_SEND_CB/CE_RECV_CB Janusz Dziedzic
2013-04-18 7:45 ` [ath9k-devel] [PATCH 2/3] ath10k: kill WARN_ON in ce.c Janusz Dziedzic
2013-04-18 7:45 ` [ath9k-devel] [PATCH 3/3] ath10k: kill MAX_SSID_LEN define Janusz Dziedzic
2013-04-18 10:41 ` [ath9k-devel] [PATCH 1/3] ath10k: kill CE_SEND_CB/CE_RECV_CB Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox