* [PATCH 0/3] wl12xx: re-enable auto-arp
@ 2012-02-02 10:22 Eliad Peller
2012-02-02 10:22 ` [PATCH 1/3] wl12xx: consider encryption and QoS in auto arp template Eliad Peller
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Eliad Peller @ 2012-02-02 10:22 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
auto-arp used to cause various issues when enabled. however,
after some fixes both in the driver and fw side, it seems to
work well. re-enable it.
Eliad Peller (3):
wl12xx: consider encryption and QoS in auto arp template
wl12xx: Revert "wl12xx: disable auto-arp"
wl12xx: configure arp filtering only after association
drivers/net/wireless/wl12xx/cmd.c | 88 +++++++++++++++++++++------
drivers/net/wireless/wl12xx/cmd.h | 3 +-
drivers/net/wireless/wl12xx/debugfs.c | 1 +
drivers/net/wireless/wl12xx/init.c | 6 +-
drivers/net/wireless/wl12xx/main.c | 83 +++++++++++++++++---------
drivers/net/wireless/wl12xx/tx.c | 11 ++--
drivers/net/wireless/wl12xx/tx.h | 4 +-
drivers/net/wireless/wl12xx/wl12xx.h | 6 ++
drivers/net/wireless/wl12xx/wl12xx_80211.h | 2 +-
9 files changed, 144 insertions(+), 60 deletions(-)
--
1.7.6.401.g6a319
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] wl12xx: consider encryption and QoS in auto arp template
2012-02-02 10:22 [PATCH 0/3] wl12xx: re-enable auto-arp Eliad Peller
@ 2012-02-02 10:22 ` Eliad Peller
2012-02-02 10:22 ` [PATCH 2/3] wl12xx: Revert "wl12xx: disable auto-arp" Eliad Peller
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Eliad Peller @ 2012-02-02 10:22 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
When configuring the arp response template,
and encryption is enabled, we should add some
space and set the protected flag bit in the fc.
In order to track the encryption type, set
wlvif->encryption_type when setting an encryption key,
and reconfigure the arp response. Clear this field on
wl1271_join, as keys have to be re-configured
anyway after a join command.
Similarly, track whether QoS is configured.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/cmd.c | 88 +++++++++++++++++++++------
drivers/net/wireless/wl12xx/cmd.h | 3 +-
drivers/net/wireless/wl12xx/debugfs.c | 1 +
drivers/net/wireless/wl12xx/init.c | 6 +-
drivers/net/wireless/wl12xx/main.c | 31 +++++++++-
drivers/net/wireless/wl12xx/tx.c | 11 ++--
drivers/net/wireless/wl12xx/tx.h | 4 +-
drivers/net/wireless/wl12xx/wl12xx.h | 6 ++
drivers/net/wireless/wl12xx/wl12xx_80211.h | 2 +-
9 files changed, 117 insertions(+), 35 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index bf3c37b..b776d9d 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -1213,32 +1213,34 @@ out:
return skb;
}
-int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif,
- __be32 ip_addr)
+int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif)
{
- int ret;
+ int ret, extra;
+ u16 fc;
struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
- struct wl12xx_arp_rsp_template tmpl;
+ struct sk_buff *skb;
+ struct wl12xx_arp_rsp_template *tmpl;
struct ieee80211_hdr_3addr *hdr;
struct arphdr *arp_hdr;
- memset(&tmpl, 0, sizeof(tmpl));
+ skb = dev_alloc_skb(sizeof(*hdr) + sizeof(__le16) + sizeof(*tmpl) +
+ WL1271_EXTRA_SPACE_MAX);
+ if (!skb) {
+ wl1271_error("failed to allocate buffer for arp rsp template");
+ return -ENOMEM;
+ }
- /* mac80211 header */
- hdr = &tmpl.hdr;
- hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA |
- IEEE80211_STYPE_DATA |
- IEEE80211_FCTL_TODS);
- memcpy(hdr->addr1, vif->bss_conf.bssid, ETH_ALEN);
- memcpy(hdr->addr2, vif->addr, ETH_ALEN);
- memset(hdr->addr3, 0xff, ETH_ALEN);
+ skb_reserve(skb, sizeof(*hdr) + WL1271_EXTRA_SPACE_MAX);
+
+ tmpl = (struct wl12xx_arp_rsp_template *)skb_put(skb, sizeof(*tmpl));
+ memset(tmpl, 0, sizeof(tmpl));
/* llc layer */
- memcpy(tmpl.llc_hdr, rfc1042_header, sizeof(rfc1042_header));
- tmpl.llc_type = cpu_to_be16(ETH_P_ARP);
+ memcpy(tmpl->llc_hdr, rfc1042_header, sizeof(rfc1042_header));
+ tmpl->llc_type = cpu_to_be16(ETH_P_ARP);
/* arp header */
- arp_hdr = &tmpl.arp_hdr;
+ arp_hdr = &tmpl->arp_hdr;
arp_hdr->ar_hrd = cpu_to_be16(ARPHRD_ETHER);
arp_hdr->ar_pro = cpu_to_be16(ETH_P_IP);
arp_hdr->ar_hln = ETH_ALEN;
@@ -1246,13 +1248,59 @@ int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif,
arp_hdr->ar_op = cpu_to_be16(ARPOP_REPLY);
/* arp payload */
- memcpy(tmpl.sender_hw, vif->addr, ETH_ALEN);
- tmpl.sender_ip = ip_addr;
+ memcpy(tmpl->sender_hw, vif->addr, ETH_ALEN);
+ tmpl->sender_ip = wlvif->ip_addr;
+
+ /* encryption space */
+ switch (wlvif->encryption_type) {
+ case KEY_TKIP:
+ extra = WL1271_EXTRA_SPACE_TKIP;
+ break;
+ case KEY_AES:
+ extra = WL1271_EXTRA_SPACE_AES;
+ break;
+ case KEY_NONE:
+ case KEY_WEP:
+ case KEY_GEM:
+ extra = 0;
+ break;
+ default:
+ wl1271_warning("Unknown encryption type: %d",
+ wlvif->encryption_type);
+ ret = -EINVAL;
+ goto out;
+ }
+
+ if (extra) {
+ u8 *space = skb_push(skb, extra);
+ memset(space, 0, extra);
+ }
+
+ /* QoS header - BE */
+ if (wlvif->sta.qos)
+ memset(skb_push(skb, sizeof(__le16)), 0, sizeof(__le16));
+
+ /* mac80211 header */
+ hdr = (struct ieee80211_hdr_3addr *)skb_push(skb, sizeof(*hdr));
+ memset(hdr, 0, sizeof(hdr));
+ fc = IEEE80211_FTYPE_DATA | IEEE80211_FCTL_TODS;
+ if (wlvif->sta.qos)
+ fc |= IEEE80211_STYPE_QOS_DATA;
+ else
+ fc |= IEEE80211_STYPE_DATA;
+ if (wlvif->encryption_type != KEY_NONE)
+ fc |= IEEE80211_FCTL_PROTECTED;
+
+ hdr->frame_control = cpu_to_le16(fc);
+ memcpy(hdr->addr1, vif->bss_conf.bssid, ETH_ALEN);
+ memcpy(hdr->addr2, vif->addr, ETH_ALEN);
+ memset(hdr->addr3, 0xff, ETH_ALEN);
ret = wl1271_cmd_template_set(wl, wlvif->role_id, CMD_TEMPL_ARP_RSP,
- &tmpl, sizeof(tmpl), 0,
+ skb->data, skb->len, 0,
wlvif->basic_rate);
-
+out:
+ dev_kfree_skb(skb);
return ret;
}
diff --git a/drivers/net/wireless/wl12xx/cmd.h b/drivers/net/wireless/wl12xx/cmd.h
index 83a2a2e..de217d9 100644
--- a/drivers/net/wireless/wl12xx/cmd.h
+++ b/drivers/net/wireless/wl12xx/cmd.h
@@ -67,8 +67,7 @@ int wl12xx_cmd_build_probe_req(struct wl1271 *wl, struct wl12xx_vif *wlvif,
struct sk_buff *wl1271_cmd_build_ap_probe_req(struct wl1271 *wl,
struct wl12xx_vif *wlvif,
struct sk_buff *skb);
-int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif,
- __be32 ip_addr);
+int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl1271_build_qos_null_data(struct wl1271 *wl, struct ieee80211_vif *vif);
int wl12xx_cmd_build_klv_null_data(struct wl1271 *wl,
struct wl12xx_vif *wlvif);
diff --git a/drivers/net/wireless/wl12xx/debugfs.c b/drivers/net/wireless/wl12xx/debugfs.c
index 1c26238..f063c70 100644
--- a/drivers/net/wireless/wl12xx/debugfs.c
+++ b/drivers/net/wireless/wl12xx/debugfs.c
@@ -579,6 +579,7 @@ static ssize_t vifs_state_read(struct file *file, char __user *user_buf,
VIF_STATE_PRINT_INT(sta.basic_rate_idx);
VIF_STATE_PRINT_INT(sta.ap_rate_idx);
VIF_STATE_PRINT_INT(sta.p2p_rate_idx);
+ VIF_STATE_PRINT_INT(sta.qos);
} else {
VIF_STATE_PRINT_INT(ap.global_hlid);
VIF_STATE_PRINT_INT(ap.bcast_hlid);
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c
index fcf2b12..acc0379 100644
--- a/drivers/net/wireless/wl12xx/init.c
+++ b/drivers/net/wireless/wl12xx/init.c
@@ -37,6 +37,7 @@
int wl1271_init_templates_config(struct wl1271 *wl)
{
int ret, i;
+ size_t max_size;
/* send empty templates for fw memory reservation */
ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
@@ -89,10 +90,11 @@ int wl1271_init_templates_config(struct wl1271 *wl)
if (ret < 0)
return ret;
+ max_size = sizeof(struct wl12xx_arp_rsp_template) +
+ WL1271_EXTRA_SPACE_MAX;
ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
CMD_TEMPL_ARP_RSP, NULL,
- sizeof
- (struct wl12xx_arp_rsp_template),
+ max_size,
0, WL1271_RATE_AUTOMATIC);
if (ret < 0)
return ret;
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index ce924e6..f22c8b1 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -2298,6 +2298,9 @@ static int wl1271_join(struct wl1271 *wl, struct wl12xx_vif *wlvif,
if (test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
wl1271_info("JOIN while associated.");
+ /* clear encryption type */
+ wlvif->encryption_type = KEY_NONE;
+
if (set_assoc)
set_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags);
@@ -2955,6 +2958,21 @@ static int wl1271_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
wl1271_error("Could not add or replace key");
goto out_sleep;
}
+
+ /*
+ * reconfiguring arp response if the unicast (or common)
+ * encryption key type was changed
+ */
+ if (wlvif->bss_type == BSS_TYPE_STA_BSS &&
+ (sta || key_type == KEY_WEP) &&
+ wlvif->encryption_type != key_type) {
+ wlvif->encryption_type = key_type;
+ ret = wl1271_cmd_build_arp_rsp(wl, wlvif);
+ if (ret < 0) {
+ wl1271_warning("build arp rsp failed: %d", ret);
+ goto out_sleep;
+ }
+ }
break;
case DISABLE_KEY:
@@ -3796,19 +3814,22 @@ sta_not_found:
if (ret < 0)
goto out;
- if (changed & BSS_CHANGED_ARP_FILTER) {
+ if ((changed & BSS_CHANGED_ARP_FILTER) ||
+ (!is_ibss && (changed & BSS_CHANGED_QOS))) {
__be32 addr = bss_conf->arp_addr_list[0];
+ wlvif->sta.qos = bss_conf->qos;
WARN_ON(wlvif->bss_type != BSS_TYPE_STA_BSS);
if (bss_conf->arp_addr_cnt == 1 &&
bss_conf->arp_filter_enabled) {
+ wlvif->ip_addr = addr;
/*
* The template should have been configured only upon
* association. however, it seems that the correct ip
* isn't being set (when sending), so we have to
* reconfigure the template upon every ip change.
*/
- ret = wl1271_cmd_build_arp_rsp(wl, wlvif, addr);
+ ret = wl1271_cmd_build_arp_rsp(wl, wlvif);
if (ret < 0) {
wl1271_warning("build arp rsp failed: %d", ret);
goto out;
@@ -3817,8 +3838,10 @@ sta_not_found:
ret = wl1271_acx_arp_ip_filter(wl, wlvif,
ACX_ARP_FILTER_ARP_FILTERING,
addr);
- } else
+ } else {
+ wlvif->ip_addr = 0;
ret = wl1271_acx_arp_ip_filter(wl, wlvif, 0, addr);
+ }
if (ret < 0)
goto out;
@@ -4868,7 +4891,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
};
/* The tx descriptor buffer and the TKIP space. */
- wl->hw->extra_tx_headroom = WL1271_TKIP_IV_SPACE +
+ wl->hw->extra_tx_headroom = WL1271_EXTRA_SPACE_TKIP +
sizeof(struct wl1271_tx_hw_descr);
/* unit us */
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index 1f5cc2a..6446e4d 100644
--- a/drivers/net/wireless/wl12xx/tx.c
+++ b/drivers/net/wireless/wl12xx/tx.c
@@ -386,7 +386,7 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct wl12xx_vif *wlvif,
if (info->control.hw_key &&
info->control.hw_key->cipher == WLAN_CIPHER_SUITE_TKIP)
- extra = WL1271_TKIP_IV_SPACE;
+ extra = WL1271_EXTRA_SPACE_TKIP;
if (info->control.hw_key) {
bool is_wep;
@@ -861,8 +861,9 @@ static void wl1271_tx_complete_packet(struct wl1271 *wl,
if (info->control.hw_key &&
info->control.hw_key->cipher == WLAN_CIPHER_SUITE_TKIP) {
int hdrlen = ieee80211_get_hdrlen_from_skb(skb);
- memmove(skb->data + WL1271_TKIP_IV_SPACE, skb->data, hdrlen);
- skb_pull(skb, WL1271_TKIP_IV_SPACE);
+ memmove(skb->data + WL1271_EXTRA_SPACE_TKIP, skb->data,
+ hdrlen);
+ skb_pull(skb, WL1271_EXTRA_SPACE_TKIP);
}
wl1271_debug(DEBUG_TX, "tx status id %u skb 0x%p failures %u rate 0x%x"
@@ -1004,9 +1005,9 @@ void wl12xx_tx_reset(struct wl1271 *wl, bool reset_tx_queues)
info->control.hw_key->cipher ==
WLAN_CIPHER_SUITE_TKIP) {
int hdrlen = ieee80211_get_hdrlen_from_skb(skb);
- memmove(skb->data + WL1271_TKIP_IV_SPACE,
+ memmove(skb->data + WL1271_EXTRA_SPACE_TKIP,
skb->data, hdrlen);
- skb_pull(skb, WL1271_TKIP_IV_SPACE);
+ skb_pull(skb, WL1271_EXTRA_SPACE_TKIP);
}
info->status.rates[0].idx = -1;
diff --git a/drivers/net/wireless/wl12xx/tx.h b/drivers/net/wireless/wl12xx/tx.h
index 7ceb3ce..e3977b5 100644
--- a/drivers/net/wireless/wl12xx/tx.h
+++ b/drivers/net/wireless/wl12xx/tx.h
@@ -52,7 +52,9 @@
#define TX_HW_RESULT_QUEUE_LEN_MASK 0xf
#define WL1271_TX_ALIGN_TO 4
-#define WL1271_TKIP_IV_SPACE 4
+#define WL1271_EXTRA_SPACE_TKIP 4
+#define WL1271_EXTRA_SPACE_AES 8
+#define WL1271_EXTRA_SPACE_MAX 8
/* Used for management frames and dummy packets */
#define WL1271_TID_MGMT 7
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
index 1463341..70b15b5 100644
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
@@ -502,6 +502,8 @@ struct wl12xx_vif {
u8 basic_rate_idx;
u8 ap_rate_idx;
u8 p2p_rate_idx;
+
+ bool qos;
} sta;
struct {
u8 global_hlid;
@@ -568,6 +570,10 @@ struct wl12xx_vif {
int rssi_thold;
int last_rssi_event;
+ /* save the current encryption type for auto-arp config */
+ u8 encryption_type;
+ __be32 ip_addr;
+
/* RX BA constraint value */
bool ba_support;
bool ba_allowed;
diff --git a/drivers/net/wireless/wl12xx/wl12xx_80211.h b/drivers/net/wireless/wl12xx/wl12xx_80211.h
index 8f0ffaf..22b0bc9 100644
--- a/drivers/net/wireless/wl12xx/wl12xx_80211.h
+++ b/drivers/net/wireless/wl12xx/wl12xx_80211.h
@@ -117,7 +117,7 @@ struct wl12xx_ps_poll_template {
} __packed;
struct wl12xx_arp_rsp_template {
- struct ieee80211_hdr_3addr hdr;
+ /* not including ieee80211 header */
u8 llc_hdr[sizeof(rfc1042_header)];
__be16 llc_type;
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] wl12xx: Revert "wl12xx: disable auto-arp"
2012-02-02 10:22 [PATCH 0/3] wl12xx: re-enable auto-arp Eliad Peller
2012-02-02 10:22 ` [PATCH 1/3] wl12xx: consider encryption and QoS in auto arp template Eliad Peller
@ 2012-02-02 10:22 ` Eliad Peller
2012-02-02 10:22 ` [PATCH 3/3] wl12xx: configure arp filtering only after association Eliad Peller
2012-02-15 10:18 ` [PATCH 0/3] wl12xx: re-enable auto-arp Luciano Coelho
3 siblings, 0 replies; 8+ messages in thread
From: Eliad Peller @ 2012-02-02 10:22 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
This reverts commit e5e2f24b3eec67a7a35d43654a997f98ca21aff2.
The encryption consideration on auto-arp configuration,
along with a fw fix, seem to resolve the crashes that
occured when auto-arp was enabled, so we can re-enable it now.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index f22c8b1..a50c116 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -3836,7 +3836,8 @@ sta_not_found:
}
ret = wl1271_acx_arp_ip_filter(wl, wlvif,
- ACX_ARP_FILTER_ARP_FILTERING,
+ (ACX_ARP_FILTER_ARP_FILTERING |
+ ACX_ARP_FILTER_AUTO_ARP),
addr);
} else {
wlvif->ip_addr = 0;
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] wl12xx: configure arp filtering only after association
2012-02-02 10:22 [PATCH 0/3] wl12xx: re-enable auto-arp Eliad Peller
2012-02-02 10:22 ` [PATCH 1/3] wl12xx: consider encryption and QoS in auto arp template Eliad Peller
2012-02-02 10:22 ` [PATCH 2/3] wl12xx: Revert "wl12xx: disable auto-arp" Eliad Peller
@ 2012-02-02 10:22 ` Eliad Peller
2012-02-15 10:18 ` [PATCH 0/3] wl12xx: re-enable auto-arp Luciano Coelho
3 siblings, 0 replies; 8+ messages in thread
From: Eliad Peller @ 2012-02-02 10:22 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
We have to configure arp filtering only after the role was
started, so move the BSS_CHANGED_ARP_FILTER handling after
the join.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/main.c | 69 ++++++++++++++++++-----------------
1 files changed, 35 insertions(+), 34 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index a50c116..01ab633 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -3814,40 +3814,6 @@ sta_not_found:
if (ret < 0)
goto out;
- if ((changed & BSS_CHANGED_ARP_FILTER) ||
- (!is_ibss && (changed & BSS_CHANGED_QOS))) {
- __be32 addr = bss_conf->arp_addr_list[0];
- wlvif->sta.qos = bss_conf->qos;
- WARN_ON(wlvif->bss_type != BSS_TYPE_STA_BSS);
-
- if (bss_conf->arp_addr_cnt == 1 &&
- bss_conf->arp_filter_enabled) {
- wlvif->ip_addr = addr;
- /*
- * The template should have been configured only upon
- * association. however, it seems that the correct ip
- * isn't being set (when sending), so we have to
- * reconfigure the template upon every ip change.
- */
- ret = wl1271_cmd_build_arp_rsp(wl, wlvif);
- if (ret < 0) {
- wl1271_warning("build arp rsp failed: %d", ret);
- goto out;
- }
-
- ret = wl1271_acx_arp_ip_filter(wl, wlvif,
- (ACX_ARP_FILTER_ARP_FILTERING |
- ACX_ARP_FILTER_AUTO_ARP),
- addr);
- } else {
- wlvif->ip_addr = 0;
- ret = wl1271_acx_arp_ip_filter(wl, wlvif, 0, addr);
- }
-
- if (ret < 0)
- goto out;
- }
-
if (do_join) {
ret = wl1271_join(wl, wlvif, set_assoc);
if (ret < 0) {
@@ -3914,6 +3880,41 @@ sta_not_found:
}
}
+ /* Handle arp filtering. Done after join. */
+ if ((changed & BSS_CHANGED_ARP_FILTER) ||
+ (!is_ibss && (changed & BSS_CHANGED_QOS))) {
+ __be32 addr = bss_conf->arp_addr_list[0];
+ wlvif->sta.qos = bss_conf->qos;
+ WARN_ON(wlvif->bss_type != BSS_TYPE_STA_BSS);
+
+ if (bss_conf->arp_addr_cnt == 1 &&
+ bss_conf->arp_filter_enabled) {
+ wlvif->ip_addr = addr;
+ /*
+ * The template should have been configured only upon
+ * association. however, it seems that the correct ip
+ * isn't being set (when sending), so we have to
+ * reconfigure the template upon every ip change.
+ */
+ ret = wl1271_cmd_build_arp_rsp(wl, wlvif);
+ if (ret < 0) {
+ wl1271_warning("build arp rsp failed: %d", ret);
+ goto out;
+ }
+
+ ret = wl1271_acx_arp_ip_filter(wl, wlvif,
+ (ACX_ARP_FILTER_ARP_FILTERING |
+ ACX_ARP_FILTER_AUTO_ARP),
+ addr);
+ } else {
+ wlvif->ip_addr = 0;
+ ret = wl1271_acx_arp_ip_filter(wl, wlvif, 0, addr);
+ }
+
+ if (ret < 0)
+ goto out;
+ }
+
out:
return;
}
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] wl12xx: re-enable auto-arp
2012-02-02 10:22 [PATCH 0/3] wl12xx: re-enable auto-arp Eliad Peller
` (2 preceding siblings ...)
2012-02-02 10:22 ` [PATCH 3/3] wl12xx: configure arp filtering only after association Eliad Peller
@ 2012-02-15 10:18 ` Luciano Coelho
2012-02-15 10:41 ` Fu yingang
3 siblings, 1 reply; 8+ messages in thread
From: Luciano Coelho @ 2012-02-15 10:18 UTC (permalink / raw)
To: Eliad Peller; +Cc: linux-wireless
On Thu, 2012-02-02 at 12:22 +0200, Eliad Peller wrote:
> auto-arp used to cause various issues when enabled. however,
> after some fixes both in the driver and fw side, it seems to
> work well. re-enable it.
>
> Eliad Peller (3):
> wl12xx: consider encryption and QoS in auto arp template
> wl12xx: Revert "wl12xx: disable auto-arp"
> wl12xx: configure arp filtering only after association
Applied this set, thanks.
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] wl12xx: re-enable auto-arp
2012-02-15 10:18 ` [PATCH 0/3] wl12xx: re-enable auto-arp Luciano Coelho
@ 2012-02-15 10:41 ` Fu yingang
2012-02-15 10:43 ` Luciano Coelho
0 siblings, 1 reply; 8+ messages in thread
From: Fu yingang @ 2012-02-15 10:41 UTC (permalink / raw)
To: Luciano Coelho, Eliad Peller; +Cc: linux-wireless
hi, all
Where can i find the latest code?
Thanks
Yingang
----- Original Message -----
From: "Luciano Coelho" <coelho@ti.com>
To: "Eliad Peller" <eliad@wizery.com>
Cc: <linux-wireless@vger.kernel.org>
Sent: Wednesday, February 15, 2012 6:18 PM
Subject: Re: [PATCH 0/3] wl12xx: re-enable auto-arp
> On Thu, 2012-02-02 at 12:22 +0200, Eliad Peller wrote:
>> auto-arp used to cause various issues when enabled. however,
>> after some fixes both in the driver and fw side, it seems to
>> work well. re-enable it.
>>
>> Eliad Peller (3):
>> wl12xx: consider encryption and QoS in auto arp template
>> wl12xx: Revert "wl12xx: disable auto-arp"
>> wl12xx: configure arp filtering only after association
>
> Applied this set, thanks.
>
> --
> Cheers,
> Luca.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] wl12xx: re-enable auto-arp
2012-02-15 10:41 ` Fu yingang
@ 2012-02-15 10:43 ` Luciano Coelho
2012-02-15 10:46 ` Fu yingang
0 siblings, 1 reply; 8+ messages in thread
From: Luciano Coelho @ 2012-02-15 10:43 UTC (permalink / raw)
To: Fu yingang; +Cc: Eliad Peller, linux-wireless
On Wed, 2012-02-15 at 18:41 +0800, Fu yingang wrote:
> hi, all
Hi Yingang.
> Where can i find the latest code?
You can find it here:
git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
This is the official integration tree for wl12xx code (use the master
branch, which is based on the latest wireless-testing).
I'll send a pull request today, so this stuff will probably go into
wireless-testing very soon.
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] wl12xx: re-enable auto-arp
2012-02-15 10:43 ` Luciano Coelho
@ 2012-02-15 10:46 ` Fu yingang
0 siblings, 0 replies; 8+ messages in thread
From: Fu yingang @ 2012-02-15 10:46 UTC (permalink / raw)
To: Luciano Coelho; +Cc: Eliad Peller, linux-wireless
hi, Luca
Thanks a lot!
Yingang
----- Original Message -----
From: "Luciano Coelho" <coelho@ti.com>
To: "Fu yingang" <yingang.fu@borqs.com>
Cc: "Eliad Peller" <eliad@wizery.com>; <linux-wireless@vger.kernel.org>
Sent: Wednesday, February 15, 2012 6:43 PM
Subject: Re: [PATCH 0/3] wl12xx: re-enable auto-arp
> On Wed, 2012-02-15 at 18:41 +0800, Fu yingang wrote:
>> hi, all
>
> Hi Yingang.
>
>
>> Where can i find the latest code?
>
> You can find it here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
>
> This is the official integration tree for wl12xx code (use the master
> branch, which is based on the latest wireless-testing).
>
> I'll send a pull request today, so this stuff will probably go into
> wireless-testing very soon.
>
> --
> Cheers,
> Luca.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-02-15 10:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-02 10:22 [PATCH 0/3] wl12xx: re-enable auto-arp Eliad Peller
2012-02-02 10:22 ` [PATCH 1/3] wl12xx: consider encryption and QoS in auto arp template Eliad Peller
2012-02-02 10:22 ` [PATCH 2/3] wl12xx: Revert "wl12xx: disable auto-arp" Eliad Peller
2012-02-02 10:22 ` [PATCH 3/3] wl12xx: configure arp filtering only after association Eliad Peller
2012-02-15 10:18 ` [PATCH 0/3] wl12xx: re-enable auto-arp Luciano Coelho
2012-02-15 10:41 ` Fu yingang
2012-02-15 10:43 ` Luciano Coelho
2012-02-15 10:46 ` Fu yingang
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).