diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/acx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/acx.c | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c index 84d94b259900..f2fbda06a129 100644 --- a/drivers/net/wireless/wl12xx/acx.c +++ b/drivers/net/wireless/wl12xx/acx.c | |||
@@ -947,9 +947,9 @@ out: | |||
947 | return ret; | 947 | return ret; |
948 | } | 948 | } |
949 | 949 | ||
950 | int wl1271_acx_mem_cfg(struct wl1271 *wl) | 950 | int wl1271_acx_ap_mem_cfg(struct wl1271 *wl) |
951 | { | 951 | { |
952 | struct wl1271_acx_config_memory *mem_conf; | 952 | struct wl1271_acx_ap_config_memory *mem_conf; |
953 | int ret; | 953 | int ret; |
954 | 954 | ||
955 | wl1271_debug(DEBUG_ACX, "wl1271 mem cfg"); | 955 | wl1271_debug(DEBUG_ACX, "wl1271 mem cfg"); |
@@ -979,13 +979,45 @@ out: | |||
979 | return ret; | 979 | return ret; |
980 | } | 980 | } |
981 | 981 | ||
982 | int wl1271_acx_init_mem_config(struct wl1271 *wl) | 982 | int wl1271_acx_sta_mem_cfg(struct wl1271 *wl) |
983 | { | 983 | { |
984 | struct wl1271_acx_sta_config_memory *mem_conf; | ||
984 | int ret; | 985 | int ret; |
985 | 986 | ||
986 | ret = wl1271_acx_mem_cfg(wl); | 987 | wl1271_debug(DEBUG_ACX, "wl1271 mem cfg"); |
987 | if (ret < 0) | 988 | |
988 | return ret; | 989 | mem_conf = kzalloc(sizeof(*mem_conf), GFP_KERNEL); |
990 | if (!mem_conf) { | ||
991 | ret = -ENOMEM; | ||
992 | goto out; | ||
993 | } | ||
994 | |||
995 | /* memory config */ | ||
996 | mem_conf->num_stations = DEFAULT_NUM_STATIONS; | ||
997 | mem_conf->rx_mem_block_num = ACX_RX_MEM_BLOCKS; | ||
998 | mem_conf->tx_min_mem_block_num = ACX_TX_MIN_MEM_BLOCKS; | ||
999 | mem_conf->num_ssid_profiles = ACX_NUM_SSID_PROFILES; | ||
1000 | mem_conf->total_tx_descriptors = cpu_to_le32(ACX_TX_DESCRIPTORS); | ||
1001 | mem_conf->dyn_mem_enable = wl->conf.mem.dynamic_memory; | ||
1002 | mem_conf->tx_free_req = wl->conf.mem.min_req_tx_blocks; | ||
1003 | mem_conf->rx_free_req = wl->conf.mem.min_req_rx_blocks; | ||
1004 | mem_conf->tx_min = wl->conf.mem.tx_min; | ||
1005 | |||
1006 | ret = wl1271_cmd_configure(wl, ACX_MEM_CFG, mem_conf, | ||
1007 | sizeof(*mem_conf)); | ||
1008 | if (ret < 0) { | ||
1009 | wl1271_warning("wl1271 mem config failed: %d", ret); | ||
1010 | goto out; | ||
1011 | } | ||
1012 | |||
1013 | out: | ||
1014 | kfree(mem_conf); | ||
1015 | return ret; | ||
1016 | } | ||
1017 | |||
1018 | int wl1271_acx_init_mem_config(struct wl1271 *wl) | ||
1019 | { | ||
1020 | int ret; | ||
989 | 1021 | ||
990 | wl->target_mem_map = kzalloc(sizeof(struct wl1271_acx_mem_map), | 1022 | wl->target_mem_map = kzalloc(sizeof(struct wl1271_acx_mem_map), |
991 | GFP_KERNEL); | 1023 | GFP_KERNEL); |