aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_main.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c61
1 files changed, 13 insertions, 48 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 3a648963fbed..15c99dd76774 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1312,53 +1312,6 @@ struct wl1271_filter_params {
1312 u8 mc_list[ACX_MC_ADDRESS_GROUP_MAX][ETH_ALEN]; 1312 u8 mc_list[ACX_MC_ADDRESS_GROUP_MAX][ETH_ALEN];
1313}; 1313};
1314 1314
1315static int wl1271_op_configure_arp_filter(struct ieee80211_hw *hw,
1316 struct ieee80211_vif *vif,
1317 struct in_ifaddr *ifa_list)
1318{
1319 struct wl1271 *wl = hw->priv;
1320 int ret = 0;
1321
1322 WARN_ON(vif != wl->vif);
1323
1324 /* disable filtering if there are multiple addresses */
1325 if (ifa_list && ifa_list->ifa_next)
1326 ifa_list = NULL;
1327
1328 mutex_lock(&wl->mutex);
1329
1330 if (wl->state == WL1271_STATE_OFF)
1331 goto out;
1332
1333 WARN_ON(wl->bss_type != BSS_TYPE_STA_BSS);
1334
1335 ret = wl1271_ps_elp_wakeup(wl, false);
1336 if (ret < 0)
1337 goto out;
1338
1339 if (ifa_list) {
1340 ret = wl1271_cmd_build_arp_reply(wl, &ifa_list->ifa_address);
1341 if (ret < 0)
1342 goto out_sleep;
1343 ret = wl1271_acx_arp_ip_filter(wl, ACX_ARP_FILTER_AND_REPLY,
1344 (u8 *)&ifa_list->ifa_address);
1345 if (ret < 0)
1346 goto out_sleep;
1347 } else {
1348 ret = wl1271_acx_arp_ip_filter(wl, ACX_ARP_DISABLE, NULL);
1349 if (ret < 0)
1350 goto out_sleep;
1351 }
1352
1353out_sleep:
1354 wl1271_ps_elp_sleep(wl);
1355
1356out:
1357 mutex_unlock(&wl->mutex);
1358
1359 return ret;
1360}
1361
1362static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, 1315static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw,
1363 struct netdev_hw_addr_list *mc_list) 1316 struct netdev_hw_addr_list *mc_list)
1364{ 1317{
@@ -1869,6 +1822,19 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
1869 } 1822 }
1870 } 1823 }
1871 1824
1825 if (changed & BSS_CHANGED_ARP_FILTER) {
1826 __be32 addr = bss_conf->arp_addr_list[0];
1827 WARN_ON(wl->bss_type != BSS_TYPE_STA_BSS);
1828
1829 if (bss_conf->arp_addr_cnt == 1 && bss_conf->arp_filter_enabled)
1830 ret = wl1271_acx_arp_ip_filter(wl, true, addr);
1831 else
1832 ret = wl1271_acx_arp_ip_filter(wl, false, addr);
1833
1834 if (ret < 0)
1835 goto out_sleep;
1836 }
1837
1872 if (do_join) { 1838 if (do_join) {
1873 ret = wl1271_join(wl, set_assoc); 1839 ret = wl1271_join(wl, set_assoc);
1874 if (ret < 0) { 1840 if (ret < 0) {
@@ -2174,7 +2140,6 @@ static const struct ieee80211_ops wl1271_ops = {
2174 .add_interface = wl1271_op_add_interface, 2140 .add_interface = wl1271_op_add_interface,
2175 .remove_interface = wl1271_op_remove_interface, 2141 .remove_interface = wl1271_op_remove_interface,
2176 .config = wl1271_op_config, 2142 .config = wl1271_op_config,
2177 .configure_arp_filter = wl1271_op_configure_arp_filter,
2178 .prepare_multicast = wl1271_op_prepare_multicast, 2143 .prepare_multicast = wl1271_op_prepare_multicast,
2179 .configure_filter = wl1271_op_configure_filter, 2144 .configure_filter = wl1271_op_configure_filter,
2180 .tx = wl1271_op_tx, 2145 .tx = wl1271_op_tx,