diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-08-07 06:33:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-14 09:13:38 -0400 |
commit | 0e71bb084adc4986b9a4be3581897f0ee703cbd5 (patch) | |
tree | 88c0fece109d88cdcd7a24e077b46bff5941327d /drivers/net/wireless/wl12xx/wl1251_acx.c | |
parent | b5ed9c1b6f8fcb2d2315f12599fd5808f7933f16 (diff) |
wl1251: remove wl1251_ops
Now wl1271 is splitted to separate files, no need to use wl1251_ops anymore.
So remove struct wl1251_chip and wl1251_ops.c.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_acx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_acx.c | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_acx.c b/drivers/net/wireless/wl12xx/wl1251_acx.c index 91fe16c8d5b7..0a225c62c97c 100644 --- a/drivers/net/wireless/wl12xx/wl1251_acx.c +++ b/drivers/net/wireless/wl12xx/wl1251_acx.c | |||
@@ -837,3 +837,82 @@ int wl1251_acx_statistics(struct wl1251 *wl, struct acx_statistics *stats) | |||
837 | 837 | ||
838 | return 0; | 838 | return 0; |
839 | } | 839 | } |
840 | |||
841 | int wl1251_acx_rate_policies(struct wl1251 *wl) | ||
842 | { | ||
843 | struct acx_rate_policy *acx; | ||
844 | int ret = 0; | ||
845 | |||
846 | wl1251_debug(DEBUG_ACX, "acx rate policies"); | ||
847 | |||
848 | acx = kzalloc(sizeof(*acx), GFP_KERNEL); | ||
849 | |||
850 | if (!acx) { | ||
851 | ret = -ENOMEM; | ||
852 | goto out; | ||
853 | } | ||
854 | |||
855 | /* configure one default (one-size-fits-all) rate class */ | ||
856 | acx->rate_class_cnt = 1; | ||
857 | acx->rate_class[0].enabled_rates = ACX_RATE_MASK_UNSPECIFIED; | ||
858 | acx->rate_class[0].short_retry_limit = ACX_RATE_RETRY_LIMIT; | ||
859 | acx->rate_class[0].long_retry_limit = ACX_RATE_RETRY_LIMIT; | ||
860 | acx->rate_class[0].aflags = 0; | ||
861 | |||
862 | ret = wl1251_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx)); | ||
863 | if (ret < 0) { | ||
864 | wl1251_warning("Setting of rate policies failed: %d", ret); | ||
865 | goto out; | ||
866 | } | ||
867 | |||
868 | out: | ||
869 | kfree(acx); | ||
870 | return ret; | ||
871 | } | ||
872 | |||
873 | int wl1251_acx_mem_cfg(struct wl1251 *wl) | ||
874 | { | ||
875 | struct wl1251_acx_config_memory *mem_conf; | ||
876 | int ret, i; | ||
877 | |||
878 | wl1251_debug(DEBUG_ACX, "acx mem cfg"); | ||
879 | |||
880 | mem_conf = kzalloc(sizeof(*mem_conf), GFP_KERNEL); | ||
881 | if (!mem_conf) { | ||
882 | ret = -ENOMEM; | ||
883 | goto out; | ||
884 | } | ||
885 | |||
886 | /* memory config */ | ||
887 | mem_conf->mem_config.num_stations = cpu_to_le16(DEFAULT_NUM_STATIONS); | ||
888 | mem_conf->mem_config.rx_mem_block_num = 35; | ||
889 | mem_conf->mem_config.tx_min_mem_block_num = 64; | ||
890 | mem_conf->mem_config.num_tx_queues = MAX_TX_QUEUES; | ||
891 | mem_conf->mem_config.host_if_options = HOSTIF_PKT_RING; | ||
892 | mem_conf->mem_config.num_ssid_profiles = 1; | ||
893 | mem_conf->mem_config.debug_buffer_size = | ||
894 | cpu_to_le16(TRACE_BUFFER_MAX_SIZE); | ||
895 | |||
896 | /* RX queue config */ | ||
897 | mem_conf->rx_queue_config.dma_address = 0; | ||
898 | mem_conf->rx_queue_config.num_descs = ACX_RX_DESC_DEF; | ||
899 | mem_conf->rx_queue_config.priority = DEFAULT_RXQ_PRIORITY; | ||
900 | mem_conf->rx_queue_config.type = DEFAULT_RXQ_TYPE; | ||
901 | |||
902 | /* TX queue config */ | ||
903 | for (i = 0; i < MAX_TX_QUEUES; i++) { | ||
904 | mem_conf->tx_queue_config[i].num_descs = ACX_TX_DESC_DEF; | ||
905 | mem_conf->tx_queue_config[i].attributes = i; | ||
906 | } | ||
907 | |||
908 | ret = wl1251_cmd_configure(wl, ACX_MEM_CFG, mem_conf, | ||
909 | sizeof(*mem_conf)); | ||
910 | if (ret < 0) { | ||
911 | wl1251_warning("wl1251 mem config failed: %d", ret); | ||
912 | goto out; | ||
913 | } | ||
914 | |||
915 | out: | ||
916 | kfree(mem_conf); | ||
917 | return ret; | ||
918 | } | ||