wl1271: modify wl1271_acx_ac_cfg() to use function parameters
[pandora-kernel.git] / drivers / net / wireless / wl12xx / wl1271_init.c
index 11249b4..2b56a9e 100644 (file)
@@ -195,7 +195,8 @@ static int wl1271_init_beacon_broadcast(struct wl1271 *wl)
 
 int wl1271_hw_init(struct wl1271 *wl)
 {
-       int ret;
+       struct conf_tx_ac_category *conf_ac;
+       int ret, i;
 
        ret = wl1271_cmd_general_parms(wl);
        if (ret < 0)
@@ -229,6 +230,10 @@ int wl1271_hw_init(struct wl1271 *wl)
        if (ret < 0)
                goto out_free_memmap;
 
+       ret = wl1271_acx_dco_itrim_params(wl);
+       if (ret < 0)
+               goto out_free_memmap;
+
        /* Initialize connection monitoring thresholds */
        ret = wl1271_acx_conn_monit_params(wl);
        if (ret < 0)
@@ -275,17 +280,22 @@ int wl1271_hw_init(struct wl1271 *wl)
                goto out_free_memmap;
 
        /* Default AC configuration */
-       ret = wl1271_acx_ac_cfg(wl);
-       if (ret < 0)
-               goto out_free_memmap;
+       for (i = 0; i < wl->conf.tx.ac_conf_count; i++) {
+               conf_ac = &wl->conf.tx.ac_conf[i];
+               ret = wl1271_acx_ac_cfg(wl, conf_ac->ac, conf_ac->cw_min,
+                                       conf_ac->cw_max, conf_ac->aifsn,
+                                       conf_ac->tx_op_limit);
+               if (ret < 0)
+                       goto out_free_memmap;
+       }
 
        /* Configure TX rate classes */
-       ret = wl1271_acx_rate_policies(wl, CONF_TX_RATE_MASK_ALL);
+       ret = wl1271_acx_rate_policies(wl);
        if (ret < 0)
                goto out_free_memmap;
 
        /* Enable data path */
-       ret = wl1271_cmd_data_path(wl, wl->channel, 1);
+       ret = wl1271_cmd_data_path(wl, 1);
        if (ret < 0)
                goto out_free_memmap;
 
@@ -299,8 +309,8 @@ int wl1271_hw_init(struct wl1271 *wl)
        if (ret < 0)
                goto out_free_memmap;
 
-       /* Configure smart reflex */
-       ret = wl1271_acx_smart_reflex(wl);
+       /* configure PM */
+       ret = wl1271_acx_pm_config(wl);
        if (ret < 0)
                goto out_free_memmap;