aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2012-03-25 10:15:25 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2012-03-26 09:36:45 -0400
commit8bd5bca821f3284ebe39ffcfcc6c62b58ab54240 (patch)
treef9cb2786400c08f5285ab3513c147c2a83ffbbd1 /drivers/net
parentcfc10f24576997b6f79e3348abc856c248eb3f07 (diff)
ath6kl: add rx data padding support
Needed when using USB. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath6kl/txrx.c7
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index 53d033478d3f..5559c9b281b6 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -1287,6 +1287,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
1287 struct wmi_data_hdr *dhdr; 1287 struct wmi_data_hdr *dhdr;
1288 int min_hdr_len; 1288 int min_hdr_len;
1289 u8 meta_type, dot11_hdr = 0; 1289 u8 meta_type, dot11_hdr = 0;
1290 u8 pad_before_data_start;
1290 int status = packet->status; 1291 int status = packet->status;
1291 enum htc_endpoint_id ept = packet->endpoint; 1292 enum htc_endpoint_id ept = packet->endpoint;
1292 bool is_amsdu, prev_ps, ps_state = false; 1293 bool is_amsdu, prev_ps, ps_state = false;
@@ -1498,6 +1499,10 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
1498 seq_no = wmi_data_hdr_get_seqno(dhdr); 1499 seq_no = wmi_data_hdr_get_seqno(dhdr);
1499 meta_type = wmi_data_hdr_get_meta(dhdr); 1500 meta_type = wmi_data_hdr_get_meta(dhdr);
1500 dot11_hdr = wmi_data_hdr_get_dot11(dhdr); 1501 dot11_hdr = wmi_data_hdr_get_dot11(dhdr);
1502 pad_before_data_start =
1503 (le16_to_cpu(dhdr->info3) >> WMI_DATA_HDR_PAD_BEFORE_DATA_SHIFT)
1504 & WMI_DATA_HDR_PAD_BEFORE_DATA_MASK;
1505
1501 skb_pull(skb, sizeof(struct wmi_data_hdr)); 1506 skb_pull(skb, sizeof(struct wmi_data_hdr));
1502 1507
1503 switch (meta_type) { 1508 switch (meta_type) {
@@ -1516,6 +1521,8 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
1516 break; 1521 break;
1517 } 1522 }
1518 1523
1524 skb_pull(skb, pad_before_data_start);
1525
1519 if (dot11_hdr) 1526 if (dot11_hdr)
1520 status = ath6kl_wmi_dot11_hdr_remove(ar->wmi, skb); 1527 status = ath6kl_wmi_dot11_hdr_remove(ar->wmi, skb);
1521 else if (!is_amsdu) 1528 else if (!is_amsdu)
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 8c8a92258517..b99e9bdca7c6 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -182,6 +182,9 @@ enum wmi_data_hdr_flags {
182#define WMI_DATA_HDR_META_MASK 0x7 182#define WMI_DATA_HDR_META_MASK 0x7
183#define WMI_DATA_HDR_META_SHIFT 13 183#define WMI_DATA_HDR_META_SHIFT 13
184 184
185#define WMI_DATA_HDR_PAD_BEFORE_DATA_MASK 0xFF
186#define WMI_DATA_HDR_PAD_BEFORE_DATA_SHIFT 0x8
187
185/* Macros for operating on WMI_DATA_HDR (info3) field */ 188/* Macros for operating on WMI_DATA_HDR (info3) field */
186#define WMI_DATA_HDR_IF_IDX_MASK 0xF 189#define WMI_DATA_HDR_IF_IDX_MASK 0xF
187 190