aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ti/wl12xx/main.c1
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c11
-rw-r--r--drivers/net/wireless/ti/wlcore/hw_ops.h9
-rw-r--r--drivers/net/wireless/ti/wlcore/rx.c1
-rw-r--r--drivers/net/wireless/ti/wlcore/wlcore.h4
5 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index 8141447e8f96..a3336534eb2a 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -1314,6 +1314,7 @@ static struct wlcore_ops wl12xx_ops = {
1314 .get_pg_ver = wl12xx_get_pg_ver, 1314 .get_pg_ver = wl12xx_get_pg_ver,
1315 .get_mac = wl12xx_get_mac, 1315 .get_mac = wl12xx_get_mac,
1316 .set_tx_desc_csum = wl12xx_set_tx_desc_csum, 1316 .set_tx_desc_csum = wl12xx_set_tx_desc_csum,
1317 .set_rx_csum = NULL,
1317}; 1318};
1318 1319
1319static struct ieee80211_sta_ht_cap wl12xx_ht_cap = { 1320static struct ieee80211_sta_ht_cap wl12xx_ht_cap = {
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index c47f52c81a72..90fccb775727 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -39,6 +39,8 @@
39#include "wl18xx.h" 39#include "wl18xx.h"
40 40
41 41
42#define WL18XX_RX_CHECKSUM_MASK 0x40
43
42static const u8 wl18xx_rate_to_idx_2ghz[] = { 44static const u8 wl18xx_rate_to_idx_2ghz[] = {
43 /* MCS rates are used only with 11n */ 45 /* MCS rates are used only with 11n */
44 15, /* WL18XX_CONF_HW_RXTX_RATE_MCS15 */ 46 15, /* WL18XX_CONF_HW_RXTX_RATE_MCS15 */
@@ -534,6 +536,14 @@ static void wl18xx_set_tx_desc_csum(struct wl1271 *wl,
534 desc->wl18xx_checksum_data |= (ip_hdr->protocol & 0x01); 536 desc->wl18xx_checksum_data |= (ip_hdr->protocol & 0x01);
535} 537}
536 538
539static void wl18xx_set_rx_csum(struct wl1271 *wl,
540 struct wl1271_rx_descriptor *desc,
541 struct sk_buff *skb)
542{
543 if (desc->status & WL18XX_RX_CHECKSUM_MASK)
544 skb->ip_summed = CHECKSUM_UNNECESSARY;
545}
546
537static struct wlcore_ops wl18xx_ops = { 547static struct wlcore_ops wl18xx_ops = {
538 .identify_chip = wl18xx_identify_chip, 548 .identify_chip = wl18xx_identify_chip,
539 .boot = wl18xx_boot, 549 .boot = wl18xx_boot,
@@ -548,6 +558,7 @@ static struct wlcore_ops wl18xx_ops = {
548 .tx_delayed_compl = NULL, 558 .tx_delayed_compl = NULL,
549 .hw_init = wl18xx_hw_init, 559 .hw_init = wl18xx_hw_init,
550 .set_tx_desc_csum = wl18xx_set_tx_desc_csum, 560 .set_tx_desc_csum = wl18xx_set_tx_desc_csum,
561 .set_rx_csum = wl18xx_set_rx_csum,
551}; 562};
552 563
553int __devinit wl18xx_probe(struct platform_device *pdev) 564int __devinit wl18xx_probe(struct platform_device *pdev)
diff --git a/drivers/net/wireless/ti/wlcore/hw_ops.h b/drivers/net/wireless/ti/wlcore/hw_ops.h
index 4573249ea89f..80f3d75ceddf 100644
--- a/drivers/net/wireless/ti/wlcore/hw_ops.h
+++ b/drivers/net/wireless/ti/wlcore/hw_ops.h
@@ -130,4 +130,13 @@ wlcore_hw_set_tx_desc_csum(struct wl1271 *wl,
130 wl->ops->set_tx_desc_csum(wl, desc, skb); 130 wl->ops->set_tx_desc_csum(wl, desc, skb);
131} 131}
132 132
133static inline void
134wlcore_hw_set_rx_csum(struct wl1271 *wl,
135 struct wl1271_rx_descriptor *desc,
136 struct sk_buff *skb)
137{
138 if (wl->ops->set_rx_csum)
139 wl->ops->set_rx_csum(wl, desc, skb);
140}
141
133#endif 142#endif
diff --git a/drivers/net/wireless/ti/wlcore/rx.c b/drivers/net/wireless/ti/wlcore/rx.c
index d6a3c6b07827..2672b1d16cef 100644
--- a/drivers/net/wireless/ti/wlcore/rx.c
+++ b/drivers/net/wireless/ti/wlcore/rx.c
@@ -186,6 +186,7 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length,
186 is_data = 1; 186 is_data = 1;
187 187
188 wl1271_rx_status(wl, desc, IEEE80211_SKB_RXCB(skb), beacon); 188 wl1271_rx_status(wl, desc, IEEE80211_SKB_RXCB(skb), beacon);
189 wlcore_hw_set_rx_csum(wl, desc, skb);
189 190
190 seq_num = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; 191 seq_num = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
191 wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s seq %d hlid %d", skb, 192 wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s seq %d hlid %d", skb,
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h
index c062d304ab0d..2922d8aec699 100644
--- a/drivers/net/wireless/ti/wlcore/wlcore.h
+++ b/drivers/net/wireless/ti/wlcore/wlcore.h
@@ -33,6 +33,7 @@
33/* forward declaration */ 33/* forward declaration */
34struct wl1271_tx_hw_descr; 34struct wl1271_tx_hw_descr;
35enum wl_rx_buf_align; 35enum wl_rx_buf_align;
36struct wl1271_rx_descriptor;
36 37
37struct wlcore_ops { 38struct wlcore_ops {
38 int (*identify_chip)(struct wl1271 *wl); 39 int (*identify_chip)(struct wl1271 *wl);
@@ -64,6 +65,9 @@ struct wlcore_ops {
64 void (*set_tx_desc_csum)(struct wl1271 *wl, 65 void (*set_tx_desc_csum)(struct wl1271 *wl,
65 struct wl1271_tx_hw_descr *desc, 66 struct wl1271_tx_hw_descr *desc,
66 struct sk_buff *skb); 67 struct sk_buff *skb);
68 void (*set_rx_csum)(struct wl1271 *wl,
69 struct wl1271_rx_descriptor *desc,
70 struct sk_buff *skb);
67}; 71};
68 72
69enum wlcore_partitions { 73enum wlcore_partitions {