wl1271: Add support for acx_pm_config
[linux-2.6.git] / drivers / net / wireless / wl12xx / wl1271_acx.c
index 038203b..0b34348 100644 (file)
@@ -34,8 +34,7 @@
 #include "wl1271_spi.h"
 #include "wl1271_ps.h"
 
-int wl1271_acx_wake_up_conditions(struct wl1271 *wl, u8 wake_up_event,
-                                 u8 listen_interval)
+int wl1271_acx_wake_up_conditions(struct wl1271 *wl)
 {
        struct acx_wake_up_condition *wake_up;
        int ret;
@@ -48,8 +47,8 @@ int wl1271_acx_wake_up_conditions(struct wl1271 *wl, u8 wake_up_event,
                goto out;
        }
 
-       wake_up->wake_up_event = wake_up_event;
-       wake_up->listen_interval = listen_interval;
+       wake_up->wake_up_event = wl->conf.conn.wake_up_event;
+       wake_up->listen_interval = wl->conf.conn.listen_interval;
 
        ret = wl1271_cmd_configure(wl, ACX_WAKE_UP_CONDITIONS,
                                   wake_up, sizeof(*wake_up));
@@ -142,7 +141,7 @@ int wl1271_acx_tx_power(struct wl1271 *wl, int power)
         * calibration, to avoid distortions
         */
        /* acx->current_tx_power = power * 10; */
-       acx->current_tx_power = 70;
+       acx->current_tx_power = 120;
 
        ret = wl1271_cmd_configure(wl, DOT11_CUR_TX_PWR, acx, sizeof(*acx));
        if (ret < 0) {
@@ -211,7 +210,7 @@ int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl)
                goto out;
        }
 
-       acx->lifetime = wl->conf.rx.rx_msdu_life_time;
+       acx->lifetime = cpu_to_le32(wl->conf.rx.rx_msdu_life_time);
        ret = wl1271_cmd_configure(wl, DOT11_RX_MSDU_LIFE_TIME,
                                   acx, sizeof(*acx));
        if (ret < 0) {
@@ -237,8 +236,8 @@ int wl1271_acx_rx_config(struct wl1271 *wl, u32 config, u32 filter)
                goto out;
        }
 
-       rx_config->config_options = config;
-       rx_config->filter_options = filter;
+       rx_config->config_options = cpu_to_le32(config);
+       rx_config->filter_options = cpu_to_le32(filter);
 
        ret = wl1271_cmd_configure(wl, ACX_RX_CFG,
                                   rx_config, sizeof(*rx_config));
@@ -265,7 +264,7 @@ int wl1271_acx_pd_threshold(struct wl1271 *wl)
                goto out;
        }
 
-       pd->threshold = wl->conf.rx.packet_detection_threshold;
+       pd->threshold = cpu_to_le32(wl->conf.rx.packet_detection_threshold);
 
        ret = wl1271_cmd_configure(wl, ACX_PD_THRESHOLD, pd, sizeof(*pd));
        if (ret < 0) {
@@ -349,8 +348,8 @@ int wl1271_acx_service_period_timeout(struct wl1271 *wl)
 
        wl1271_debug(DEBUG_ACX, "acx service period timeout");
 
-       rx_timeout->ps_poll_timeout = wl->conf.rx.ps_poll_timeout;
-       rx_timeout->upsd_timeout = wl->conf.rx.upsd_timeout;
+       rx_timeout->ps_poll_timeout = cpu_to_le16(wl->conf.rx.ps_poll_timeout);
+       rx_timeout->upsd_timeout = cpu_to_le16(wl->conf.rx.upsd_timeout);
 
        ret = wl1271_cmd_configure(wl, ACX_SERVICE_PERIOD_TIMEOUT,
                                   rx_timeout, sizeof(*rx_timeout));
@@ -378,7 +377,7 @@ int wl1271_acx_rts_threshold(struct wl1271 *wl, u16 rts_threshold)
                goto out;
        }
 
-       rts->threshold = rts_threshold;
+       rts->threshold = cpu_to_le16(rts_threshold);
 
        ret = wl1271_cmd_configure(wl, DOT11_RTS_THRESHOLD, rts, sizeof(*rts));
        if (ret < 0) {
@@ -391,13 +390,46 @@ out:
        return ret;
 }
 
-int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter)
+int wl1271_acx_dco_itrim_params(struct wl1271 *wl)
 {
-       struct acx_beacon_filter_option *beacon_filter;
+       struct acx_dco_itrim_params *dco;
+       struct conf_itrim_settings *c = &wl->conf.itrim;
        int ret;
 
+       wl1271_debug(DEBUG_ACX, "acx dco itrim parameters");
+
+       dco = kzalloc(sizeof(*dco), GFP_KERNEL);
+       if (!dco) {
+               ret = -ENOMEM;
+               goto out;
+       }
+
+       dco->enable = c->enable;
+       dco->timeout = cpu_to_le32(c->timeout);
+
+       ret = wl1271_cmd_configure(wl, ACX_SET_DCO_ITRIM_PARAMS,
+                                  dco, sizeof(*dco));
+       if (ret < 0) {
+               wl1271_warning("failed to set dco itrim parameters: %d", ret);
+               goto out;
+       }
+
+out:
+       kfree(dco);
+       return ret;
+}
+
+int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter)
+{
+       struct acx_beacon_filter_option *beacon_filter = NULL;
+       int ret = 0;
+
        wl1271_debug(DEBUG_ACX, "acx beacon filter opt");
 
+       if (enable_filter &&
+           wl->conf.conn.bcn_filt_mode == CONF_BCN_FILT_MODE_DISABLED)
+               goto out;
+
        beacon_filter = kzalloc(sizeof(*beacon_filter), GFP_KERNEL);
        if (!beacon_filter) {
                ret = -ENOMEM;
@@ -405,6 +437,11 @@ int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter)
        }
 
        beacon_filter->enable = enable_filter;
+
+       /*
+        * When set to zero, and the filter is enabled, beacons
+        * without the unicast TIM bit set are dropped.
+        */
        beacon_filter->max_num_beacons = 0;
 
        ret = wl1271_cmd_configure(wl, ACX_BEACON_FILTER_OPT,
@@ -422,8 +459,9 @@ out:
 int wl1271_acx_beacon_filter_table(struct wl1271 *wl)
 {
        struct acx_beacon_filter_ie_table *ie_table;
-       int idx = 0;
+       int i, idx = 0;
        int ret;
+       bool vendor_spec = false;
 
        wl1271_debug(DEBUG_ACX, "acx beacon filter table");
 
@@ -434,9 +472,31 @@ int wl1271_acx_beacon_filter_table(struct wl1271 *wl)
        }
 
        /* configure default beacon pass-through rules */
-       ie_table->num_ie = 1;
-       ie_table->table[idx++] = BEACON_FILTER_IE_ID_CHANNEL_SWITCH_ANN;
-       ie_table->table[idx++] = BEACON_RULE_PASS_ON_APPEARANCE;
+       ie_table->num_ie = 0;
+       for (i = 0; i < wl->conf.conn.bcn_filt_ie_count; i++) {
+               struct conf_bcn_filt_rule *r = &(wl->conf.conn.bcn_filt_ie[i]);
+               ie_table->table[idx++] = r->ie;
+               ie_table->table[idx++] = r->rule;
+
+               if (r->ie == WLAN_EID_VENDOR_SPECIFIC) {
+                       /* only one vendor specific ie allowed */
+                       if (vendor_spec)
+                               continue;
+
+                       /* for vendor specific rules configure the
+                          additional fields */
+                       memcpy(&(ie_table->table[idx]), r->oui,
+                              CONF_BCN_IE_OUI_LEN);
+                       idx += CONF_BCN_IE_OUI_LEN;
+                       ie_table->table[idx++] = r->type;
+                       memcpy(&(ie_table->table[idx]), r->version,
+                              CONF_BCN_IE_VER_LEN);
+                       idx += CONF_BCN_IE_VER_LEN;
+                       vendor_spec = true;
+               }
+
+               ie_table->num_ie++;
+       }
 
        ret = wl1271_cmd_configure(wl, ACX_BEACON_FILTER_TABLE,
                                   ie_table, sizeof(*ie_table));
@@ -463,8 +523,8 @@ int wl1271_acx_conn_monit_params(struct wl1271 *wl)
                goto out;
        }
 
-       acx->synch_fail_thold = SYNCH_FAIL_DEFAULT_THRESHOLD;
-       acx->bss_lose_timeout = NO_BEACON_DEFAULT_TIMEOUT;
+       acx->synch_fail_thold = cpu_to_le32(wl->conf.conn.synch_fail_thold);
+       acx->bss_lose_timeout = cpu_to_le32(wl->conf.conn.bss_lose_timeout);
 
        ret = wl1271_cmd_configure(wl, ACX_CONN_MONIT_PARAMS,
                                   acx, sizeof(*acx));
@@ -521,16 +581,18 @@ int wl1271_acx_sg_cfg(struct wl1271 *wl)
        }
 
        /* BT-WLAN coext parameters */
-       param->per_threshold = c->per_threshold;
-       param->max_scan_compensation_time = c->max_scan_compensation_time;
-       param->nfs_sample_interval = c->nfs_sample_interval;
+       param->per_threshold = cpu_to_le32(c->per_threshold);
+       param->max_scan_compensation_time =
+               cpu_to_le32(c->max_scan_compensation_time);
+       param->nfs_sample_interval = cpu_to_le16(c->nfs_sample_interval);
        param->load_ratio = c->load_ratio;
        param->auto_ps_mode = c->auto_ps_mode;
        param->probe_req_compensation = c->probe_req_compensation;
        param->scan_window_compensation = c->scan_window_compensation;
        param->antenna_config = c->antenna_config;
        param->beacon_miss_threshold = c->beacon_miss_threshold;
-       param->rate_adaptation_threshold = c->rate_adaptation_threshold;
+       param->rate_adaptation_threshold =
+               cpu_to_le32(c->rate_adaptation_threshold);
        param->rate_adaptation_snr = c->rate_adaptation_snr;
 
        ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param));
@@ -557,7 +619,7 @@ int wl1271_acx_cca_threshold(struct wl1271 *wl)
                goto out;
        }
 
-       detection->rx_cca_threshold = wl->conf.rx.rx_cca_threshold;
+       detection->rx_cca_threshold = cpu_to_le16(wl->conf.rx.rx_cca_threshold);
        detection->tx_energy_detection = wl->conf.tx.tx_energy_detection;
 
        ret = wl1271_cmd_configure(wl, ACX_CCA_THRESHOLD,
@@ -585,10 +647,10 @@ int wl1271_acx_bcn_dtim_options(struct wl1271 *wl)
                goto out;
        }
 
-       bb->beacon_rx_timeout = BCN_RX_TIMEOUT_DEF_VALUE;
-       bb->broadcast_timeout = BROADCAST_RX_TIMEOUT_DEF_VALUE;
-       bb->rx_broadcast_in_ps = RX_BROADCAST_IN_PS_DEF_VALUE;
-       bb->ps_poll_threshold = CONSECUTIVE_PS_POLL_FAILURE_DEF;
+       bb->beacon_rx_timeout = cpu_to_le16(wl->conf.conn.beacon_rx_timeout);
+       bb->broadcast_timeout = cpu_to_le16(wl->conf.conn.broadcast_timeout);
+       bb->rx_broadcast_in_ps = wl->conf.conn.rx_broadcast_in_ps;
+       bb->ps_poll_threshold = wl->conf.conn.ps_poll_threshold;
 
        ret = wl1271_cmd_configure(wl, ACX_BCN_DTIM_OPTIONS, bb, sizeof(*bb));
        if (ret < 0) {
@@ -614,7 +676,7 @@ int wl1271_acx_aid(struct wl1271 *wl, u16 aid)
                goto out;
        }
 
-       acx_aid->aid = aid;
+       acx_aid->aid = cpu_to_le16(aid);
 
        ret = wl1271_cmd_configure(wl, ACX_AID, acx_aid, sizeof(*acx_aid));
        if (ret < 0) {
@@ -641,9 +703,8 @@ int wl1271_acx_event_mbox_mask(struct wl1271 *wl, u32 event_mask)
        }
 
        /* high event mask is unused */
-       mask->high_event_mask = 0xffffffff;
-
-       mask->event_mask = event_mask;
+       mask->high_event_mask = cpu_to_le32(0xffffffff);
+       mask->event_mask = cpu_to_le32(event_mask);
 
        ret = wl1271_cmd_configure(wl, ACX_EVENT_MBOX_MASK,
                                   mask, sizeof(*mask));
@@ -726,10 +787,11 @@ int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats)
        return 0;
 }
 
-int wl1271_acx_rate_policies(struct wl1271 *wl, u32 enabled_rates)
+int wl1271_acx_rate_policies(struct wl1271 *wl)
 {
        struct acx_rate_policy *acx;
        struct conf_tx_rate_class *c = &wl->conf.tx.rc_conf;
+       int idx = 0;
        int ret = 0;
 
        wl1271_debug(DEBUG_ACX, "acx rate policies");
@@ -741,12 +803,21 @@ int wl1271_acx_rate_policies(struct wl1271 *wl, u32 enabled_rates)
                goto out;
        }
 
-       /* configure one default (one-size-fits-all) rate class */
-       acx->rate_class_cnt = 1;
-       acx->rate_class[0].enabled_rates = enabled_rates;
-       acx->rate_class[0].short_retry_limit = c->short_retry_limit;
-       acx->rate_class[0].long_retry_limit = c->long_retry_limit;
-       acx->rate_class[0].aflags = c->aflags;
+       /* configure one basic rate class */
+       idx = ACX_TX_BASIC_RATE;
+       acx->rate_class[idx].enabled_rates = cpu_to_le32(wl->basic_rate_set);
+       acx->rate_class[idx].short_retry_limit = c->short_retry_limit;
+       acx->rate_class[idx].long_retry_limit = c->long_retry_limit;
+       acx->rate_class[idx].aflags = c->aflags;
+
+       /* configure one AP supported rate class */
+       idx = ACX_TX_AP_FULL_RATE;
+       acx->rate_class[idx].enabled_rates = cpu_to_le32(wl->rate_set);
+       acx->rate_class[idx].short_retry_limit = c->short_retry_limit;
+       acx->rate_class[idx].long_retry_limit = c->long_retry_limit;
+       acx->rate_class[idx].aflags = c->aflags;
+
+       acx->rate_class_cnt = cpu_to_le32(ACX_TX_RATE_POLICY_CNT);
 
        ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx));
        if (ret < 0) {
@@ -777,10 +848,10 @@ int wl1271_acx_ac_cfg(struct wl1271 *wl)
                struct conf_tx_ac_category *c = &(wl->conf.tx.ac_conf[i]);
                acx->ac = c->ac;
                acx->cw_min = c->cw_min;
-               acx->cw_max = c->cw_max;
+               acx->cw_max = cpu_to_le16(c->cw_max);
                acx->aifsn = c->aifsn;
                acx->reserved = 0;
-               acx->tx_op_limit = c->tx_op_limit;
+               acx->tx_op_limit = cpu_to_le16(c->tx_op_limit);
 
                ret = wl1271_cmd_configure(wl, ACX_AC_CFG, acx, sizeof(*acx));
                if (ret < 0) {
@@ -816,8 +887,8 @@ int wl1271_acx_tid_cfg(struct wl1271 *wl)
                acx->tsid = c->tsid;
                acx->ps_scheme = c->ps_scheme;
                acx->ack_policy = c->ack_policy;
-               acx->apsd_conf[0] = c->apsd_conf[0];
-               acx->apsd_conf[1] = c->apsd_conf[1];
+               acx->apsd_conf[0] = cpu_to_le32(c->apsd_conf[0]);
+               acx->apsd_conf[1] = cpu_to_le32(c->apsd_conf[1]);
 
                ret = wl1271_cmd_configure(wl, ACX_TID_CFG, acx, sizeof(*acx));
                if (ret < 0) {
@@ -845,7 +916,7 @@ int wl1271_acx_frag_threshold(struct wl1271 *wl)
                goto out;
        }
 
-       acx->frag_threshold = wl->conf.tx.frag_threshold;
+       acx->frag_threshold = cpu_to_le16(wl->conf.tx.frag_threshold);
        ret = wl1271_cmd_configure(wl, ACX_FRAG_CFG, acx, sizeof(*acx));
        if (ret < 0) {
                wl1271_warning("Setting of frag threshold failed: %d", ret);
@@ -871,8 +942,8 @@ int wl1271_acx_tx_config_options(struct wl1271 *wl)
                goto out;
        }
 
-       acx->tx_compl_timeout = wl->conf.tx.tx_compl_timeout;
-       acx->tx_compl_threshold = wl->conf.tx.tx_compl_threshold;
+       acx->tx_compl_timeout = cpu_to_le16(wl->conf.tx.tx_compl_timeout);
+       acx->tx_compl_threshold = cpu_to_le16(wl->conf.tx.tx_compl_threshold);
        ret = wl1271_cmd_configure(wl, ACX_TX_CONFIG_OPT, acx, sizeof(*acx));
        if (ret < 0) {
                wl1271_warning("Setting of tx options failed: %d", ret);
@@ -898,11 +969,11 @@ int wl1271_acx_mem_cfg(struct wl1271 *wl)
        }
 
        /* memory config */
-       mem_conf->num_stations = cpu_to_le16(DEFAULT_NUM_STATIONS);
+       mem_conf->num_stations = DEFAULT_NUM_STATIONS;
        mem_conf->rx_mem_block_num = ACX_RX_MEM_BLOCKS;
        mem_conf->tx_min_mem_block_num = ACX_TX_MIN_MEM_BLOCKS;
        mem_conf->num_ssid_profiles = ACX_NUM_SSID_PROFILES;
-       mem_conf->total_tx_descriptors = ACX_TX_DESCRIPTORS;
+       mem_conf->total_tx_descriptors = cpu_to_le32(ACX_TX_DESCRIPTORS);
 
        ret = wl1271_cmd_configure(wl, ACX_MEM_CFG, mem_conf,
                                   sizeof(*mem_conf));
@@ -942,7 +1013,8 @@ int wl1271_acx_init_mem_config(struct wl1271 *wl)
        }
 
        /* initialize TX block book keeping */
-       wl->tx_blocks_available = wl->target_mem_map->num_tx_mem_blocks;
+       wl->tx_blocks_available =
+               le32_to_cpu(wl->target_mem_map->num_tx_mem_blocks);
        wl1271_debug(DEBUG_TX, "available tx blocks: %d",
                     wl->tx_blocks_available);
 
@@ -962,9 +1034,9 @@ int wl1271_acx_init_rx_interrupt(struct wl1271 *wl)
                goto out;
        }
 
-       rx_conf->threshold = wl->conf.rx.irq_pkt_threshold;
-       rx_conf->timeout = wl->conf.rx.irq_timeout;
-       rx_conf->mblk_threshold = wl->conf.rx.irq_blk_threshold;
+       rx_conf->threshold = cpu_to_le16(wl->conf.rx.irq_pkt_threshold);
+       rx_conf->timeout = cpu_to_le16(wl->conf.rx.irq_timeout);
+       rx_conf->mblk_threshold = cpu_to_le16(wl->conf.rx.irq_blk_threshold);
        rx_conf->queue_type = wl->conf.rx.queue_type;
 
        ret = wl1271_cmd_configure(wl, ACX_RX_CONFIG_OPT, rx_conf,
@@ -979,74 +1051,98 @@ out:
        return ret;
 }
 
-int wl1271_acx_smart_reflex(struct wl1271 *wl)
+int wl1271_acx_bet_enable(struct wl1271 *wl, bool enable)
 {
-       struct acx_smart_reflex_state *sr_state = NULL;
-       struct acx_smart_reflex_config_params *sr_param = NULL;
-       int ret;
+       struct wl1271_acx_bet_enable *acx = NULL;
+       int ret = 0;
+
+       wl1271_debug(DEBUG_ACX, "acx bet enable");
 
-       wl1271_debug(DEBUG_ACX, "acx smart reflex");
+       if (enable && wl->conf.conn.bet_enable == CONF_BET_MODE_DISABLE)
+               goto out;
 
-       sr_param = kzalloc(sizeof(*sr_param), GFP_KERNEL);
-       if (!sr_param) {
+       acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+       if (!acx) {
                ret = -ENOMEM;
                goto out;
        }
 
-       /* set cryptic smart reflex parameters - source TI reference code */
-       sr_param->error_table[0].len = 0x07;
-       sr_param->error_table[0].upper_limit = 0x03;
-       sr_param->error_table[0].values[0] = 0x18;
-       sr_param->error_table[0].values[1] = 0x10;
-       sr_param->error_table[0].values[2] = 0x05;
-       sr_param->error_table[0].values[3] = 0xfb;
-       sr_param->error_table[0].values[4] = 0xf0;
-       sr_param->error_table[0].values[5] = 0xe8;
-
-       sr_param->error_table[1].len = 0x07;
-       sr_param->error_table[1].upper_limit = 0x03;
-       sr_param->error_table[1].values[0] = 0x18;
-       sr_param->error_table[1].values[1] = 0x10;
-       sr_param->error_table[1].values[2] = 0x05;
-       sr_param->error_table[1].values[3] = 0xf6;
-       sr_param->error_table[1].values[4] = 0xf0;
-       sr_param->error_table[1].values[5] = 0xe8;
-
-       sr_param->error_table[2].len = 0x07;
-       sr_param->error_table[2].upper_limit = 0x03;
-       sr_param->error_table[2].values[0] = 0x18;
-       sr_param->error_table[2].values[1] = 0x10;
-       sr_param->error_table[2].values[2] = 0x05;
-       sr_param->error_table[2].values[3] = 0xfb;
-       sr_param->error_table[2].values[4] = 0xf0;
-       sr_param->error_table[2].values[5] = 0xe8;
-
-       ret = wl1271_cmd_configure(wl, ACX_SET_SMART_REFLEX_PARAMS,
-                                  sr_param, sizeof(*sr_param));
+       acx->enable = enable ? CONF_BET_MODE_ENABLE : CONF_BET_MODE_DISABLE;
+       acx->max_consecutive = wl->conf.conn.bet_max_consecutive;
+
+       ret = wl1271_cmd_configure(wl, ACX_BET_ENABLE, acx, sizeof(*acx));
        if (ret < 0) {
-               wl1271_warning("failed to set smart reflex params: %d", ret);
+               wl1271_warning("acx bet enable failed: %d", ret);
                goto out;
        }
 
-       sr_state = kzalloc(sizeof(*sr_state), GFP_KERNEL);
-       if (!sr_state) {
+out:
+       kfree(acx);
+       return ret;
+}
+
+int wl1271_acx_arp_ip_filter(struct wl1271 *wl, bool enable, u8 *address,
+                            u8 version)
+{
+       struct wl1271_acx_arp_filter *acx;
+       int ret;
+
+       wl1271_debug(DEBUG_ACX, "acx arp ip filter, enable: %d", enable);
+
+       acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+       if (!acx) {
                ret = -ENOMEM;
                goto out;
        }
 
-       /* enable smart reflex */
-       sr_state->enable = 1;
+       acx->version = version;
+       acx->enable = enable;
 
-       ret = wl1271_cmd_configure(wl, ACX_SET_SMART_REFLEX_STATE,
-                                  sr_state, sizeof(*sr_state));
+       if (enable == true) {
+               if (version == ACX_IPV4_VERSION)
+                       memcpy(acx->address, address, ACX_IPV4_ADDR_SIZE);
+               else if (version == ACX_IPV6_VERSION)
+                       memcpy(acx->address, address, sizeof(acx->address));
+               else
+                       wl1271_error("Invalid IP version");
+       }
+
+       ret = wl1271_cmd_configure(wl, ACX_ARP_IP_FILTER,
+                                  acx, sizeof(*acx));
        if (ret < 0) {
-               wl1271_warning("failed to set smart reflex params: %d", ret);
+               wl1271_warning("failed to set arp ip filter: %d", ret);
                goto out;
        }
 
 out:
-       kfree(sr_state);
-       kfree(sr_param);
+       kfree(acx);
        return ret;
+}
 
+int wl1271_acx_pm_config(struct wl1271 *wl)
+{
+       struct wl1271_acx_pm_config *acx = NULL;
+       struct  conf_pm_config_settings *c = &wl->conf.pm_config;
+       int ret = 0;
+
+       wl1271_debug(DEBUG_ACX, "acx pm config");
+
+       acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+       if (!acx) {
+               ret = -ENOMEM;
+               goto out;
+       }
+
+       acx->host_clk_settling_time = cpu_to_le32(c->host_clk_settling_time);
+       acx->host_fast_wakeup_support = c->host_fast_wakeup_support;
+
+       ret = wl1271_cmd_configure(wl, ACX_PM_CONFIG, acx, sizeof(*acx));
+       if (ret < 0) {
+               wl1271_warning("acx pm config failed: %d", ret);
+               goto out;
+       }
+
+out:
+       kfree(acx);
+       return ret;
 }