Subject: [PATCH 1/4] ath6kl: Release ar->lock right afer updating net_stats in ath6kl_rx()

This lock is intended to protect stats there, not neccessary to
hold it beyond that.

Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/txrx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index 167bdb9..d546051 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -1044,13 +1044,13 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
ar->net_stats.rx_packets++;
ar->net_stats.rx_bytes += packet->act_len;

+ spin_unlock_bh(&ar->lock);
+
skb_put(skb, packet->act_len + HTC_HDR_LENGTH);
skb_pull(skb, HTC_HDR_LENGTH);

ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, skb->data, skb->len);

- spin_unlock_bh(&ar->lock);
-
skb->dev = ar->net_dev;

if (!test_bit(WMI_ENABLED, &ar->flag)) {
--
1.7.0.4



2011-08-17 16:31:06

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 1/4] ath6kl: Release ar->lock right afer updating net_stats in ath6kl_rx()

Thanks, patches 1-3 applied. Patch 4 dropped as you sent v2 for that patch.

Kalle

Subject: RE: [PATCH 1/4] ath6kl: Release ar->lock right afer updating net_stats in ath6kl_rx()


________________________________________
From: Thiagarajan, Vasanthakumar
Sent: Sunday, August 14, 2011 5:08 PM
To: [email protected]
Cc: [email protected]
Subject: [PATCH 1/4] ath6kl: Release ar->lock right afer updating net_stats in ath6kl_rx()

This lock is intended to protect stats there, not neccessary to
hold it beyond that.

John,

These patches are meant for ath6kl.git, sorry to address to you, i'll fix my --to next time.

Vasanth

Subject: [PATCH 3/4] ath6kl: Cleanup ath6kl_wmi_data_hdr_remove()

Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/txrx.c | 3 +--
drivers/net/wireless/ath/ath6kl/wmi.c | 10 ----------
drivers/net/wireless/ath/ath6kl/wmi.h | 1 -
3 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index fb67c24..5d3d4b6 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -1162,8 +1162,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
seq_no = wmi_data_hdr_get_seqno(dhdr);
meta_type = wmi_data_hdr_get_meta(dhdr);
dot11_hdr = wmi_data_hdr_get_dot11(dhdr);
-
- ath6kl_wmi_data_hdr_remove(ar->wmi, skb);
+ skb_pull(skb, sizeof(struct wmi_data_hdr));

switch (meta_type) {
case WMI_META_VERSION_1:
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index f5aa33d..13b1a20 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -376,16 +376,6 @@ int ath6kl_wmi_dot3_2_dix(struct sk_buff *skb)
return 0;
}

-int ath6kl_wmi_data_hdr_remove(struct wmi *wmi, struct sk_buff *skb)
-{
- if (WARN_ON(skb == NULL))
- return -EINVAL;
-
- skb_pull(skb, sizeof(struct wmi_data_hdr));
-
- return 0;
-}
-
static void ath6kl_wmi_convert_bssinfo_hdr2_to_hdr(struct sk_buff *skb,
u8 *datap)
{
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index fe3ddce..8fa5d6e 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -1925,7 +1925,6 @@ int ath6kl_wmi_data_hdr_add(struct wmi *wmi, struct sk_buff *skb,

int ath6kl_wmi_dot11_hdr_remove(struct wmi *wmi, struct sk_buff *skb);
int ath6kl_wmi_dot3_2_dix(struct sk_buff *skb);
-int ath6kl_wmi_data_hdr_remove(struct wmi *wmi, struct sk_buff *skb);
int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, struct sk_buff *skb,
u32 layer2_priority, bool wmm_enabled,
u8 *ac);
--
1.7.0.4


Subject: [PATCH 2/4] ath6kl: Minor cleanup in min_hdr_len computation

Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/txrx.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index d546051..fb67c24 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -1065,9 +1065,8 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
return;
}

- min_hdr_len = sizeof(struct ethhdr);
- min_hdr_len += sizeof(struct wmi_data_hdr) +
- sizeof(struct ath6kl_llc_snap_hdr);
+ min_hdr_len = sizeof(struct ethhdr) + sizeof(struct wmi_data_hdr) +
+ sizeof(struct ath6kl_llc_snap_hdr);

dhdr = (struct wmi_data_hdr *) skb->data;

--
1.7.0.4


Subject: [PATCH 4/4] ath6kl: Fix bug in computing AMSU subframe padding

This fixes AMSDU rx, otherwise it fails with the following warnings.

"802.3 AMSDU frame bound check failed"

Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/txrx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index 5d3d4b6..a55e0b7 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -812,7 +812,7 @@ static void aggr_slice_amsdu(struct aggr_info *p_aggr,
/* Add the length of A-MSDU subframe padding bytes -
* Round to nearest word.
*/
- frame_8023_len = ALIGN(frame_8023_len + 3, 3);
+ frame_8023_len = ALIGN(frame_8023_len, 3);

framep += frame_8023_len;
amsdu_len -= frame_8023_len;
--
1.7.0.4