Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <stdbool.h> |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 4 | #include <string.h> |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 5 | |
| 6 | struct vty; |
| 7 | |
| 8 | /* handover_cfg is an opaque struct to manage several levels of configuration. There is an overall handover |
| 9 | * config on 'network' level and a per-'bts' specific handover config. If the 'bts' level sets no values, |
| 10 | * the defaults from 'network' level are used implicitly, and changes take effect immediately. */ |
| 11 | struct handover_cfg; |
| 12 | |
Neels Hofmeyr | 909e972 | 2017-12-07 03:54:01 +0100 | [diff] [blame] | 13 | #define HO_CFG_CONGESTION_CHECK_DEFAULT 10 |
| 14 | |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 15 | struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cfg); |
| 16 | |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 17 | #define HO_CFG_STR_HANDOVER1 "Handover options for handover decision algorithm 1\n" |
| 18 | #define HO_CFG_STR_HANDOVER2 "Handover options for handover decision algorithm 2\n" |
| 19 | #define HO_CFG_STR_WIN "Measurement averaging settings\n" |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 20 | #define HO_CFG_STR_WIN_RXLEV HO_CFG_STR_WIN "Received-Level averaging\n" |
| 21 | #define HO_CFG_STR_WIN_RXQUAL HO_CFG_STR_WIN "Received-Quality averaging\n" |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 22 | #define HO_CFG_STR_POWER_BUDGET "Neighbor cell power triggering\n" "Neighbor cell power triggering\n" |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 23 | #define HO_CFG_STR_AVG_COUNT "Number of values to average over\n" |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 24 | #define HO_CFG_STR_2 " (HO algo 2 only)\n" |
| 25 | #define HO_CFG_STR_MIN "Minimum Level/Quality thresholds before triggering HO" HO_CFG_STR_2 |
| 26 | #define HO_CFG_STR_AFS_BIAS "Configure bias to prefer AFS (AMR on TCH/F) over other codecs" HO_CFG_STR_2 |
| 27 | #define HO_CFG_STR_MIN_TCH "Minimum free TCH timeslots before cell is considered congested" HO_CFG_STR_2 |
| 28 | #define HO_CFG_STR_PENALTY_TIME "Set penalty times to wait between repeated handovers" HO_CFG_STR_2 |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 29 | |
| 30 | #define as_is(x) (x) |
| 31 | |
| 32 | static inline bool a2bool(const char *arg) |
| 33 | { |
| 34 | return (bool)(atoi(arg)); |
| 35 | } |
| 36 | |
| 37 | static inline int bool2i(bool arg) |
| 38 | { |
| 39 | return arg? 1 : 0; |
| 40 | } |
| 41 | |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 42 | static inline bool a2tdma(const char *arg) |
| 43 | { |
| 44 | if (!strcmp(arg, "full")) |
| 45 | return true; |
| 46 | return false; |
| 47 | } |
| 48 | |
| 49 | static inline const char *tdma2a(bool val) |
| 50 | { |
| 51 | return val? "full" : "subset"; |
| 52 | } |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 53 | |
| 54 | /* The HO_CFG_ONE_MEMBER macro gets redefined, depending on whether to define struct members, |
| 55 | * function declarations or definitions... It is of the format |
| 56 | * HO_CFG_ONE_MEMBER(TYPE, NAME, DEFAULT_VAL, |
| 57 | * VTY_CMD, VTY_CMD_ARG, VTY_ARG_EVAL, |
| 58 | * VTY_WRITE_FMT, VTY_WRITE_CONV, |
| 59 | * VTY_DOC) |
| 60 | * Then using HO_CFG_ALL_MEMBERS can save a lot of code dup in defining API declaration, API |
| 61 | * definitions, VTY commands and VTY write code. Of course this doesn't prevent us from adding manual |
| 62 | * members as well, in case future additions don't fit in this scheme. |
| 63 | * |
| 64 | * TYPE: a type name like int. |
| 65 | * NAME: a variable name suitable for a struct member. |
| 66 | * DEFAULT_VAL: default value, as passed to the VTY, e.g. '0' or 'foo', without quotes. |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 67 | * VTY_CMD_PREFIX: "handover1 ", "handover2 ", ... or just "" for the common general items. |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 68 | * VTY_CMD: a command string for VTY without any arguments. |
| 69 | * VTY_CMD_ARG: VTY value range like '<0-23>' or 'foo|bar', will become '(VTY_CMD_ARG|default)'. |
| 70 | * VTY_ARG_EVAL: function name for parsing the VTY arg[0], e.g. 'atoi'. |
| 71 | * VTY_WRITE_FMT: printf-like string format for vty_out(). |
| 72 | * VTY_WRITE_CONV: function name to convert struct value to VTY_WRITE_FMT, e.g. 'as_is'. |
| 73 | * VTY_DOC: VTY documentation strings to match VTY_CMD and VTY_CMD_ARGs. |
| 74 | */ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 75 | #define HO_GENERAL_CFG_ALL_MEMBERS \ |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 76 | \ |
| 77 | HO_CFG_ONE_MEMBER(bool, ho_active, 0, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 78 | "", "handover", "0|1", a2bool, "%d", bool2i, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 79 | "Handover general config\n" \ |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 80 | "Disable in-call handover\n" \ |
| 81 | "Enable in-call handover\n" \ |
| 82 | "Enable/disable handover: ") \ |
| 83 | \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 84 | HO_CFG_ONE_MEMBER(int, algorithm, 1, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 85 | "", "handover algorithm", "1|2", atoi, "%d", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 86 | "Handover general config\n" \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 87 | "Choose algorithm for handover decision\n" \ |
| 88 | "Algorithm 1: trigger handover based on comparing current cell and neighbor RxLev and RxQual," \ |
| 89 | " only.\n" \ |
| 90 | "Algorithm 2: trigger handover on RxLev/RxQual, and also to balance the load across several" \ |
| 91 | " cells. Consider available codecs. Prevent repeated handover by penalty timers.\n") \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 92 | |
| 93 | |
| 94 | #define HODEC1_CFG_ALL_MEMBERS \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 95 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 96 | HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxlev_avg_win, 10, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 97 | "handover1 ", "window rxlev averaging", "<1-10>", atoi, "%u", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 98 | HO_CFG_STR_HANDOVER1 \ |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 99 | HO_CFG_STR_WIN_RXLEV \ |
| 100 | "How many RxLev measurements are used for averaging\n" \ |
| 101 | "RxLev averaging: " HO_CFG_STR_AVG_COUNT) \ |
| 102 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 103 | HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxqual_avg_win, 1, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 104 | "handover1 ", "window rxqual averaging", "<1-10>", atoi, "%u", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 105 | HO_CFG_STR_HANDOVER1 \ |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 106 | HO_CFG_STR_WIN_RXQUAL \ |
| 107 | "How many RxQual measurements are used for averaging\n" \ |
| 108 | "RxQual averaging: " HO_CFG_STR_AVG_COUNT) \ |
| 109 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 110 | HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxlev_neigh_avg_win, 10, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 111 | "handover1 ", "window rxlev neighbor averaging", "<1-10>", atoi, "%u", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 112 | HO_CFG_STR_HANDOVER1 \ |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 113 | HO_CFG_STR_WIN_RXLEV \ |
| 114 | "How many Neighbor RxLev measurements are used for averaging\n" \ |
| 115 | "How many Neighbor RxLev measurements are used for averaging\n" \ |
| 116 | "Neighbor RxLev averaging: " HO_CFG_STR_AVG_COUNT) \ |
| 117 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 118 | HO_CFG_ONE_MEMBER(unsigned int, hodec1_pwr_interval, 6, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 119 | "handover1 ", "power budget interval", "<1-99>", atoi, "%u", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 120 | HO_CFG_STR_HANDOVER1 \ |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 121 | HO_CFG_STR_POWER_BUDGET \ |
| 122 | "How often to check for a better cell (SACCH frames)\n" \ |
| 123 | "Check for stronger neighbor every N number of SACCH frames\n") \ |
| 124 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 125 | HO_CFG_ONE_MEMBER(unsigned int, hodec1_pwr_hysteresis, 3, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 126 | "handover1 ", "power budget hysteresis", "<0-999>", atoi, "%u", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 127 | HO_CFG_STR_HANDOVER1 \ |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 128 | HO_CFG_STR_POWER_BUDGET \ |
| 129 | "How many dBm stronger must a neighbor be to become a HO candidate\n" \ |
| 130 | "Neighbor's strength difference in dBm\n") \ |
| 131 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 132 | HO_CFG_ONE_MEMBER(unsigned int, hodec1_max_distance, 9999, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 133 | "handover1 ", "maximum distance" , "<0-9999>", atoi, "%u", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 134 | HO_CFG_STR_HANDOVER1 \ |
| 135 | "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n" \ |
| 136 | "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n" \ |
| 137 | "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n") \ |
| 138 | |
| 139 | |
| 140 | #define HODEC2_CFG_ALL_MEMBERS \ |
| 141 | \ |
| 142 | HO_CFG_ONE_MEMBER(unsigned int, hodec2_rxlev_avg_win, 10, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 143 | "handover2 ", "window rxlev averaging", "<1-10>", atoi, "%u", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 144 | HO_CFG_STR_HANDOVER2 \ |
| 145 | HO_CFG_STR_WIN_RXLEV \ |
| 146 | "How many RxLev measurements are used for averaging\n" \ |
| 147 | "RxLev averaging: " HO_CFG_STR_AVG_COUNT) \ |
| 148 | \ |
| 149 | HO_CFG_ONE_MEMBER(unsigned int, hodec2_rxqual_avg_win, 1, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 150 | "handover2 ", "window rxqual averaging", "<1-10>", atoi, "%u", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 151 | HO_CFG_STR_HANDOVER2 \ |
| 152 | HO_CFG_STR_WIN_RXQUAL \ |
| 153 | "How many RxQual measurements are used for averaging\n" \ |
| 154 | "RxQual averaging: " HO_CFG_STR_AVG_COUNT) \ |
| 155 | \ |
| 156 | HO_CFG_ONE_MEMBER(unsigned int, hodec2_rxlev_neigh_avg_win, 10, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 157 | "handover2 ", "window rxlev neighbor averaging", "<1-10>", atoi, "%u", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 158 | HO_CFG_STR_HANDOVER2 \ |
| 159 | HO_CFG_STR_WIN_RXLEV \ |
| 160 | "How many Neighbor RxLev measurements are used for averaging\n" \ |
| 161 | "How many Neighbor RxLev measurements are used for averaging\n" \ |
| 162 | "Neighbor RxLev averaging: " HO_CFG_STR_AVG_COUNT) \ |
| 163 | \ |
| 164 | HO_CFG_ONE_MEMBER(unsigned int, hodec2_pwr_interval, 6, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 165 | "handover2 ", "power budget interval", "<1-99>", atoi, "%u", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 166 | HO_CFG_STR_HANDOVER2 \ |
| 167 | HO_CFG_STR_POWER_BUDGET \ |
| 168 | "How often to check for a better cell (SACCH frames)\n" \ |
| 169 | "Check for stronger neighbor every N number of SACCH frames\n") \ |
| 170 | \ |
| 171 | HO_CFG_ONE_MEMBER(unsigned int, hodec2_pwr_hysteresis, 3, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 172 | "handover2 ", "power budget hysteresis", "<0-999>", atoi, "%u", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 173 | HO_CFG_STR_HANDOVER2 \ |
| 174 | HO_CFG_STR_POWER_BUDGET \ |
| 175 | "How many dBm stronger must a neighbor be to become a HO candidate\n" \ |
| 176 | "Neighbor's strength difference in dBm\n") \ |
| 177 | \ |
| 178 | HO_CFG_ONE_MEMBER(unsigned int, hodec2_max_distance, 9999, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 179 | "handover2 ", "maximum distance" , "<0-9999>", atoi, "%u", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 180 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 181 | "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n" \ |
| 182 | "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n" \ |
| 183 | "Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n") \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 184 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 185 | HO_CFG_ONE_MEMBER(bool, hodec2_as_active, 0, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 186 | "handover2 ", "assignment", "0|1", a2bool, "%d", bool2i, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 187 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 188 | "Enable or disable in-call channel re-assignment" HO_CFG_STR_2 \ |
| 189 | "Disable in-call assignment\n" \ |
| 190 | "Enable in-call assignment\n") \ |
| 191 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 192 | HO_CFG_ONE_MEMBER(bool, hodec2_full_tdma, subset, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 193 | "handover2 ", "tdma-measurement", "full|subset", a2tdma, "%s", tdma2a, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 194 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 195 | "Define measurement set of TDMA frames" HO_CFG_STR_2 \ |
| 196 | "Full set of 102/104 TDMA frames\n" \ |
| 197 | "Sub set of 4 TDMA frames (SACCH)\n") \ |
| 198 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 199 | HO_CFG_ONE_MEMBER(int, hodec2_min_rxlev, -100, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 200 | "handover2 ", "min rxlev", "<-110--50>", atoi, "%d", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 201 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 202 | HO_CFG_STR_MIN \ |
| 203 | "How weak may RxLev of an MS become before triggering HO\n" \ |
| 204 | "minimum RxLev (dBm)\n") \ |
| 205 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 206 | HO_CFG_ONE_MEMBER(int, hodec2_min_rxqual, 5, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 207 | "handover2 ", "min rxqual", "<0-7>", atoi, "%d", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 208 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 209 | HO_CFG_STR_MIN \ |
| 210 | "How bad may RxQual of an MS become before triggering HO\n" \ |
| 211 | "minimum RxQual (dBm)\n") \ |
| 212 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 213 | HO_CFG_ONE_MEMBER(int, hodec2_afs_bias_rxlev, 0, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 214 | "handover2 ", "afs-bias rxlev", "<0-20>", atoi, "%d", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 215 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 216 | HO_CFG_STR_AFS_BIAS \ |
| 217 | "RxLev improvement bias for AFS over other codecs\n" \ |
| 218 | "Virtual RxLev improvement (dBm)\n") \ |
| 219 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 220 | HO_CFG_ONE_MEMBER(int, hodec2_afs_bias_rxqual, 0, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 221 | "handover2 ", "afs-bias rxqual", "<0-7>", atoi, "%d", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 222 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 223 | HO_CFG_STR_AFS_BIAS \ |
| 224 | "RxQual improvement bias for AFS over other codecs\n" \ |
| 225 | "Virtual RxQual improvement (dBm)\n") \ |
| 226 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 227 | HO_CFG_ONE_MEMBER(int, hodec2_tchf_min_slots, 0, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 228 | "handover2 ", "min-free-slots tch/f", "<0-9999>", atoi, "%d", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 229 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 230 | HO_CFG_STR_MIN_TCH \ |
| 231 | "Minimum free TCH/F timeslots before cell is considered congested\n" \ |
| 232 | "Number of TCH/F slots\n") \ |
| 233 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 234 | HO_CFG_ONE_MEMBER(int, hodec2_tchh_min_slots, 0, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 235 | "handover2 ", "min-free-slots tch/h", "<0-9999>", atoi, "%d", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 236 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 237 | HO_CFG_STR_MIN_TCH \ |
| 238 | "Minimum free TCH/H timeslots before cell is considered congested\n" \ |
| 239 | "Number of TCH/H slots\n") \ |
| 240 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 241 | HO_CFG_ONE_MEMBER(int, hodec2_ho_max, 9999, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 242 | "handover2 ", "max-handovers", "<1-9999>", atoi, "%d", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 243 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 244 | "Maximum number of concurrent handovers allowed per cell" HO_CFG_STR_2 \ |
| 245 | "Number\n") \ |
| 246 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 247 | HO_CFG_ONE_MEMBER(int, hodec2_penalty_max_dist, 300, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 248 | "handover2 ", "penalty-time max-distance", "<0-99999>", atoi, "%d", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 249 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 250 | HO_CFG_STR_PENALTY_TIME \ |
| 251 | "Time to suspend handovers after leaving this cell due to exceeding max distance\n" \ |
| 252 | "Seconds\n") \ |
| 253 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 254 | HO_CFG_ONE_MEMBER(int, hodec2_penalty_failed_ho, 60, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 255 | "handover2 ", "penalty-time failed-ho", "<0-99999>", atoi, "%d", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 256 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 257 | HO_CFG_STR_PENALTY_TIME \ |
| 258 | "Time to suspend handovers after handover failure to this cell\n" \ |
| 259 | "Seconds\n") \ |
| 260 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 261 | HO_CFG_ONE_MEMBER(int, hodec2_penalty_failed_as, 60, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 262 | "handover2 ", "penalty-time failed-assignment", "<0-99999>", atoi, "%d", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 263 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 264 | HO_CFG_STR_PENALTY_TIME \ |
| 265 | "Time to suspend handovers after assignment failure in this cell\n" \ |
| 266 | "Seconds\n") \ |
| 267 | \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 268 | HO_CFG_ONE_MEMBER(int, hodec2_retries, 0, \ |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 269 | "handover2 ", "retries", "<0-9>", atoi, "%d", as_is, \ |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 270 | HO_CFG_STR_HANDOVER2 \ |
Neels Hofmeyr | 87b5eb6 | 2017-12-07 01:55:58 +0100 | [diff] [blame] | 271 | "Immediately retry on handover/assignment failure" HO_CFG_STR_2 \ |
| 272 | "Number of retries\n") \ |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 273 | |
Neels Hofmeyr | dd42eb9 | 2018-02-14 19:56:23 +0100 | [diff] [blame] | 274 | #define HO_CFG_ALL_MEMBERS \ |
| 275 | HO_GENERAL_CFG_ALL_MEMBERS \ |
| 276 | HODEC1_CFG_ALL_MEMBERS \ |
| 277 | HODEC2_CFG_ALL_MEMBERS \ |
| 278 | |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 279 | |
| 280 | /* Declare public API for handover cfg parameters... */ |
| 281 | |
Neels Hofmeyr | 444f9e2 | 2018-02-15 03:59:17 +0100 | [diff] [blame] | 282 | #define HO_CFG_ONE_MEMBER(TYPE, NAME, DEFAULT_VAL, VTY0, VTY1, VTY2, VTY3, VTY4, VTY5, VTY6) \ |
Neels Hofmeyr | e25018b | 2017-11-27 21:29:33 +0100 | [diff] [blame] | 283 | TYPE ho_get_##NAME(struct handover_cfg *ho); \ |
| 284 | void ho_set_##NAME(struct handover_cfg *ho, TYPE val); \ |
| 285 | bool ho_isset_##NAME(struct handover_cfg *ho); \ |
| 286 | void ho_clear_##NAME(struct handover_cfg *ho); \ |
| 287 | bool ho_isset_on_parent_##NAME(struct handover_cfg *ho); |
| 288 | |
| 289 | HO_CFG_ALL_MEMBERS |
| 290 | #undef HO_CFG_ONE_MEMBER |