diff options
author | Eliad Peller <eliad@wizery.com> | 2010-12-09 09:31:27 (GMT) |
---|---|---|
committer | Luciano Coelho <luciano.coelho@nokia.com> | 2010-12-15 13:04:56 (GMT) |
commit | c5312772156bb5f9b2e95e4c91526d578426a069 (patch) | |
tree | e79bf5435e4b084230a02cb3ae07b6ac25d3baf3 /drivers/net/wireless/wl12xx/main.c | |
parent | b69eb80bf7a6922fef8056d42b06124a7de31501 (diff) | |
download | linux-fsl-qoriq-c5312772156bb5f9b2e95e4c91526d578426a069.tar.xz |
wl12xx: add auto-arp support
The auto-arp feature of wl12xx allows the firmware to automatically
response to arp requests asking for its ip.
in order to use it, we configure the arp response template and
enable the corresponding bit in wl1271_acx_arp_filter (along with
passing its ip)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 0b79c49..f7d7cad 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -2110,10 +2110,26 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw, __be32 addr = bss_conf->arp_addr_list[0]; WARN_ON(wl->bss_type != BSS_TYPE_STA_BSS); - if (bss_conf->arp_addr_cnt == 1 && bss_conf->arp_filter_enabled) - ret = wl1271_acx_arp_ip_filter(wl, true, addr); - else - ret = wl1271_acx_arp_ip_filter(wl, false, addr); + if (bss_conf->arp_addr_cnt == 1 && + bss_conf->arp_filter_enabled) { + /* + * 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, addr); + if (ret < 0) { + wl1271_warning("build arp rsp failed: %d", ret); + goto out_sleep; + } + + ret = wl1271_acx_arp_ip_filter(wl, + (ACX_ARP_FILTER_ARP_FILTERING | + ACX_ARP_FILTER_AUTO_ARP), + addr); + } else + ret = wl1271_acx_arp_ip_filter(wl, 0, addr); if (ret < 0) goto out_sleep; |