wl12xx: use wl1271_acx_beacon_filter_opt for both sta and ap
authorEliad Peller <eliad@wizery.com>
Sun, 14 Aug 2011 10:17:13 +0000 (13:17 +0300)
committerLuciano Coelho <coelho@ti.com>
Mon, 22 Aug 2011 09:35:25 +0000 (12:35 +0300)
Use ACX_BEACON_FILTER_OPT for both station and ap roles
(use the generic wl1271_acx_beacon_filter_opt()
instead of wl1271_acx_set_ap_beacon_filter() ).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/acx.c
drivers/net/wireless/wl12xx/acx.h
drivers/net/wireless/wl12xx/init.c
drivers/net/wireless/wl12xx/main.c

index dfb1cbb35acd4ef6db897c5e83112f6305533e02..968d2197ac8117cf0d0056c0279e5e5bdde2cc0c 100644 (file)
@@ -1660,31 +1660,6 @@ out:
        return ret;
 }
 
-int wl1271_acx_set_ap_beacon_filter(struct wl1271 *wl, bool enable)
-{
-       struct acx_ap_beacon_filter *acx = NULL;
-       int ret;
-
-       wl1271_debug(DEBUG_ACX, "acx set ap beacon filter: %d", enable);
-
-       acx = kzalloc(sizeof(*acx), GFP_KERNEL);
-       if (!acx)
-               return -ENOMEM;
-
-       acx->enable = enable ? 1 : 0;
-
-       ret = wl1271_cmd_configure(wl, ACX_AP_BEACON_FILTER_OPT,
-                                  acx, sizeof(*acx));
-       if (ret < 0) {
-               wl1271_warning("acx set ap beacon filter failed: %d", ret);
-               goto out;
-       }
-
-out:
-       kfree(acx);
-       return ret;
-}
-
 int wl1271_acx_fm_coex(struct wl1271 *wl)
 {
        struct wl1271_acx_fm_coex *acx;
index 67258a15de21fbac76cd1249946e978443161121..3aec410634e799741fbe5b93f2ce9bb19998208a 100644 (file)
@@ -1096,13 +1096,6 @@ struct wl1271_acx_inconnection_sta {
        u8 padding1[2];
 } __packed;
 
-struct acx_ap_beacon_filter {
-       struct acx_header header;
-
-       u8 enable;
-       u8 pad[3];
-} __packed;
-
 /*
  * ACX_FM_COEX_CFG
  * set the FM co-existence parameters.
@@ -1177,7 +1170,6 @@ enum {
        ACX_TID_CFG                 = 0x001A,
        ACX_PS_RX_STREAMING         = 0x001B,
        ACX_BEACON_FILTER_OPT       = 0x001F,
-       ACX_AP_BEACON_FILTER_OPT    = 0x0020,
        ACX_NOISE_HIST              = 0x0021,
        ACX_HDK_VERSION             = 0x0022, /* ??? */
        ACX_PD_THRESHOLD            = 0x0023,
@@ -1301,7 +1293,6 @@ int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, bool enable);
 int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl);
 int wl1271_acx_config_ps(struct wl1271 *wl);
 int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr);
-int wl1271_acx_set_ap_beacon_filter(struct wl1271 *wl, bool enable);
 int wl1271_acx_fm_coex(struct wl1271 *wl);
 
 #endif /* __WL1271_ACX_H__ */
index 683c8d1285515a6fb564c6cb788ff8165c574c24..3a6660901c3381028a44bd70b3d984eb39a8075d 100644 (file)
@@ -469,7 +469,7 @@ int wl1271_ap_init_templates(struct wl1271 *wl)
         * when operating as AP we want to receive external beacons for
         * configuring ERP protection.
         */
-       ret = wl1271_acx_set_ap_beacon_filter(wl, false);
+       ret = wl1271_acx_beacon_filter_opt(wl, false);
        if (ret < 0)
                return ret;
 
index 1389c5cba343f7c89737e4d426d5c367a3171544..d683bca9b30846b57c869b43f4ee553562361ca7 100644 (file)
@@ -1639,7 +1639,7 @@ static int wl1271_configure_suspend_ap(struct wl1271 *wl)
        if (ret < 0)
                goto out_unlock;
 
-       ret = wl1271_acx_set_ap_beacon_filter(wl, true);
+       ret = wl1271_acx_beacon_filter_opt(wl, true);
 
        wl1271_ps_elp_sleep(wl);
 out_unlock:
@@ -1677,7 +1677,7 @@ static void wl1271_configure_resume(struct wl1271 *wl)
                        wl1271_ps_set_mode(wl, STATION_ACTIVE_MODE,
                                           wl->basic_rate, true);
        } else if (is_ap) {
-               wl1271_acx_set_ap_beacon_filter(wl, false);
+               wl1271_acx_beacon_filter_opt(wl, false);
        }
 
        wl1271_ps_elp_sleep(wl);