rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | #ifndef _MLL1_UMTS_TDD_H |
| 2 | #define _MLL1_UMTS_TDD_H |
| 3 | |
| 4 | #include "kal_public_defs.h" /*for LOCAL_PARA_HDR*/ |
| 5 | #include "mll1_common.h" |
| 6 | /***************************************************************************** |
| 7 | * DEFINITIONS |
| 8 | *****************************************************************************/ |
| 9 | #define MO_PURPOSE_NUM 12 /* Undefined */ |
| 10 | #define UMTS_TDD_SESSION_IN_PERIOD 8 /* align gsm, LTE only need 6 for gp0/gp1 */ |
| 11 | #define UMTS_TDD_SCHEDULE_DELAY 0 /* used to postpone available gap start time */ |
| 12 | /***************************************************************************** |
| 13 | * ENUMERATIONS |
| 14 | *****************************************************************************/ |
| 15 | /***************************************************************************** |
| 16 | * ENUMERATION |
| 17 | * tl1_ll1_rat_status_enum |
| 18 | * DESCRIPTIONS |
| 19 | * Used to identify the status in UMTS TDD RAT. |
| 20 | * NOTE |
| 21 | * any modification should sync. with ll1_rat_status_enum |
| 22 | *****************************************************************************/ |
| 23 | typedef enum |
| 24 | { |
| 25 | TL1_LL1_RAT_FLIGHT =0, |
| 26 | TL1_LL1_RAT_STANDBY, |
| 27 | TL1_LL1_RAT_ACTIVE, |
| 28 | TL1_LL1_RAT_NUM |
| 29 | } tl1_ll1_rat_status_enum; |
| 30 | |
| 31 | /***************************************************************************** |
| 32 | * STRUCTURES |
| 33 | *****************************************************************************/ |
| 34 | /***************************************************************************** |
| 35 | * STRUCT |
| 36 | * umts_tdd_time_struct |
| 37 | * |
| 38 | * DESCRIPTIONS |
| 39 | * UMTS TDD system timing base |
| 40 | * |
| 41 | * PARAMETERS |
| 42 | * sub_sfn - UMTS TDD sub-system frame number (0~8191), 1 sub_sfn = 6400*8. |
| 43 | * echips - UMTS TDD Echip (0~51199) |
| 44 | *****************************************************************************/ |
| 45 | typedef struct |
| 46 | { |
| 47 | kal_int32 sub_sfn; |
| 48 | kal_int32 echips; |
| 49 | }umts_tdd_time_struct; |
| 50 | |
| 51 | /***************************************************************************** |
| 52 | * STRUCT |
| 53 | * umts_tdd_mo_allocation_struct |
| 54 | * |
| 55 | * DESCRIPTIONS |
| 56 | * UMTS TDD measurement occasion allocation structure in subframe. |
| 57 | * |
| 58 | * PARAMETERS |
| 59 | * period - Measurement occasion period |
| 60 | * length - The measurement occasion length starting from the Offset |
| 61 | * offset - The measurement occasion position in the measurement period. |
| 62 | * slot_bmp - Bit 0 is for timeslot 0/DwPTS/GP (LL1 will not expand UpPTS for TA of slot 1). |
| 63 | * Bit 1 is for timeslot 1/UpPTS. |
| 64 | * Bit 2 is for timeslot 2 ¡K Bit 6 is for timeslot 6. |
| 65 | * The value 1 of a bit means the corresponding timeslot is used for measurement. |
| 66 | * Bit 0 is the first/right most bit of the bit string. |
| 67 | * purpose_bmp - Measurement Purpose. |
| 68 | * Bit 0 is for E-UTRA measurement. |
| 69 | * Bit 1 is for Inter-frequency measurement. |
| 70 | * Bit 2 is for BSIC re-confirmation. |
| 71 | * Bit 3 is for Initial BSIC identification. |
| 72 | * Bit 4 is for GSM carrier RSSI measurement. |
| 73 | * Bit 5 is for Drop frame for EL1-Meas. |
| 74 | * Bit 6 is for Reserved for FB/SB search |
| 75 | * Bit 7 is for ISCP. |
| 76 | * Bit 8 is for FMO. |
| 77 | * Bit 9 is for DL. |
| 78 | * Bit 10 is for UL. |
| 79 | * The value 1 of a bit means that the measurement occasion pattern sequence is applicable for the corresponding type of measurement. |
| 80 | * Bit 0 is the first/rightmost bit of the bit string. |
| 81 | * Only one bit will be set to 1, the others are set to zero. |
| 82 | *****************************************************************************/ |
| 83 | typedef struct |
| 84 | { |
| 85 | kal_uint16 period; |
| 86 | kal_uint16 length; |
| 87 | kal_uint16 offset; |
| 88 | kal_uint8 slot_bmp; |
| 89 | kal_uint32 purpose_bmp; |
| 90 | }umts_tdd_mo_allocation_struct; |
| 91 | |
| 92 | /***************************************************************************** |
| 93 | * STRUCT |
| 94 | * umts_tdd_idle_gap_struct |
| 95 | * |
| 96 | * DESCRIPTIONS |
| 97 | * Idle gap structure of UMTS TDD. |
| 98 | * |
| 99 | * PARAMETERS |
| 100 | * start_time - start time of the gap |
| 101 | * length - length of the gap session (in echip) |
| 102 | * is_drx_tick - KAL_TRUE : First tick in this DRX period |
| 103 | * KAL_FALSE: Not the first free interval in this DRX period |
| 104 | *****************************************************************************/ |
| 105 | typedef struct |
| 106 | { |
| 107 | umts_tdd_time_struct start_time; |
| 108 | kal_int32 length; |
| 109 | kal_bool is_drx_tick; |
| 110 | }umts_tdd_idle_gap_struct; |
| 111 | |
| 112 | /***************************************************************************** |
| 113 | * STRUCT |
| 114 | * umts_tdd_connected_gap_struct |
| 115 | * |
| 116 | * DESCRIPTIONS |
| 117 | * UMTS TDD gap structure in CELL_FACH/CELL_DCH. |
| 118 | * |
| 119 | * PARAMETERS |
| 120 | * mo_num - The number of mo pattern |
| 121 | * measure_occasion[] - One measure_occasion[] stands for one measurement occasion. |
| 122 | * purpose_bmp in umts_tdd_mo_allocation_struct may set more than one bit to 1 due to DMO configuration. |
| 123 | * MO_PURPOSE_NUM = total number of measurement purposes = 12. |
| 124 | * last_tx_slot - The last TX slot UE used before the second switch point in one sub-frame. |
| 125 | * doff - to align CFN in sub-frame, |
| 126 | * only used when umts_tdd_mo_allocation_struct.purpose_bmp |
| 127 | * Bit 9 or 10 is set to 1. |
| 128 | * Bit 9 is for DL. |
| 129 | * Bit 10 is for UL. |
| 130 | *****************************************************************************/ |
| 131 | typedef struct |
| 132 | { |
| 133 | kal_uint16 mo_num; |
| 134 | umts_tdd_mo_allocation_struct measure_occasion[MO_PURPOSE_NUM]; |
| 135 | kal_uint8 last_tx_slot; |
| 136 | kal_uint8 doff; |
| 137 | }umts_tdd_connected_gap_struct; |
| 138 | |
| 139 | /***************************************************************************** |
| 140 | * STRUCT |
| 141 | * ll1_umts_tdd_standby_gap_struct |
| 142 | * |
| 143 | * DESCRIPTIONS |
| 144 | * UMTS TDD standby gap pattern structure. |
| 145 | * |
| 146 | * PARAMETERS |
| 147 | * start_time - start time of the gap session |
| 148 | * length - length of the gap session (in echip) |
| 149 | *****************************************************************************/ |
| 150 | typedef struct |
| 151 | { |
| 152 | umts_tdd_time_struct start_time; |
| 153 | kal_int32 length; |
| 154 | }ll1_umts_tdd_standby_gap_struct; |
| 155 | |
| 156 | /***************************************************************************** |
| 157 | * STRUCT |
| 158 | * ll1_tl1_expand_gap_pattern_struct |
| 159 | * |
| 160 | * DESCRIPTIONS |
| 161 | * LL1 expands gap pattern for TL1 |
| 162 | * |
| 163 | * PARAMETERS |
| 164 | * session_num - Indicate how many gap session |
| 165 | * session[] - Standby gap session. |
| 166 | * measure_tid - Transition id for RANK tick./Valid when active RAT is in DRX mode./And bit 0 in tick_bitmap is "1" |
| 167 | * hps_tid - Transition id for HPS tick./Valid when active RAT is in DRX mode./And bit 1 in tick_bitmap is "1" |
| 168 | * tick_bitmap - Bit 0 : Rank search , Bit 1 : Priority search when active rat in idle mode, |
| 169 | * Bit 0 : is_first gap in Nfreq*expansion_period when active rat in connect mode. |
| 170 | *****************************************************************************/ |
| 171 | typedef struct |
| 172 | { |
| 173 | kal_uint8 session_num; |
| 174 | ll1_umts_tdd_standby_gap_struct session[UMTS_TDD_SESSION_IN_PERIOD]; |
| 175 | kal_uint8 measure_tid; |
| 176 | kal_uint8 hps_tid; |
| 177 | kal_uint8 tick_bitmap; |
| 178 | }ll1_tl1_expand_gap_pattern_struct; |
| 179 | |
| 180 | /***************************************************************************** |
| 181 | * STRUCT |
| 182 | * tl1_ll1_sync_cnf_struct |
| 183 | * |
| 184 | * DESCRIPTIONS |
| 185 | * TL1 uses this primitive to confirm LL1 that current UMTS TDD timing |
| 186 | * and micro second counter value. |
| 187 | * |
| 188 | * PARAMETERS |
| 189 | * LOCAL_PARA_HDR |
| 190 | * current_time - sync. time in umts_tdd_time_struct |
| 191 | * umts_tdd_ustime - sync. time in USC |
| 192 | *****************************************************************************/ |
| 193 | typedef struct |
| 194 | { |
| 195 | LOCAL_PARA_HDR |
| 196 | umts_tdd_time_struct current_time; |
| 197 | kal_uint32 umts_tdd_ustime; |
| 198 | }tl1_ll1_sync_cnf_struct; |
| 199 | |
| 200 | /***************************************************************************** |
| 201 | * STRUCT |
| 202 | * tl1_ll1_rat_status_ind_struct |
| 203 | * |
| 204 | * DESCRIPTIONS |
| 205 | * This message is sent from TL1 to LL1 for informing current TL1 RAT status. |
| 206 | * This message should be sent when TL1 RAT status changed. |
| 207 | * |
| 208 | * PARAMETERS |
| 209 | * LOCAL_PARA_HDR |
| 210 | * rat_status - RAT status in TL1 |
| 211 | *****************************************************************************/ |
| 212 | typedef struct |
| 213 | { |
| 214 | LOCAL_PARA_HDR |
| 215 | tl1_ll1_rat_status_enum rat_status; |
| 216 | }tl1_ll1_rat_status_ind_struct; |
| 217 | |
| 218 | /***************************************************************************** |
| 219 | * STRUCT |
| 220 | * tl1_ll1_mode_status_ind_struct |
| 221 | * |
| 222 | * DESCRIPTIONS |
| 223 | * This message is sent from TL1 to LL1 for informing that TL1 mode status when TL1 is active RAT. |
| 224 | * This message should be sent when TL1 mode status changed. |
| 225 | * |
| 226 | * PARAMETERS |
| 227 | * LOCAL_PARA_HDR |
| 228 | * tdd_mode_status - current mode in TL1 when UMTS TDD is active RAT |
| 229 | * drx_cycle_length - valid when gsm_mode_status = TL1_LL1_PCH_MODE |
| 230 | *****************************************************************************/ |
| 231 | typedef struct |
| 232 | { |
| 233 | LOCAL_PARA_HDR |
| 234 | ll1_active_rat_mode_status_enum tdd_mode_status; |
| 235 | kal_uint16 drx_cycle_length; |
| 236 | }tl1_ll1_mode_status_ind_struct; |
| 237 | |
| 238 | /***************************************************************************** |
| 239 | * STRUCT |
| 240 | * ll1_tl1_mode_status_update_ind_struct |
| 241 | * |
| 242 | * DESCRIPTIONS |
| 243 | * This message is sent to TL1 for informing that mode status of active RAT when TL1 is standby RAT. |
| 244 | * This message should be updated for TL1 in standby when any mode status changed in active RAT. |
| 245 | * Also when TL1 enters into standby RAT from FLIGHT, LL1 will update current mode state in active RAT to TL1. |
| 246 | * |
| 247 | * PARAMETERS |
| 248 | * LOCAL_PARA_HDR |
| 249 | * active_rat_mode_status - current mode status in active RAT |
| 250 | *****************************************************************************/ |
| 251 | typedef struct |
| 252 | { |
| 253 | LOCAL_PARA_HDR |
| 254 | ll1_active_rat_mode_status_enum active_rat_mode_status; |
| 255 | }ll1_tl1_mode_status_update_ind_struct; |
| 256 | |
| 257 | /***************************************************************************** |
| 258 | * STRUCT |
| 259 | * tl1_ll1_active_measure_status_ind_struct |
| 260 | * |
| 261 | * DESCRIPTIONS |
| 262 | * TL1 informs LL1 that how many higher priority inter-frequencies in TL1 when high priority search is turned on |
| 263 | * |
| 264 | * PARAMETERS |
| 265 | * LOCAL_PARA_HDR |
| 266 | * freq_num - The number of higher priority inter-freq. in TL1.(0~3) |
| 267 | * When HPS off, the freq_num is equal to zero. |
| 268 | *****************************************************************************/ |
| 269 | typedef struct |
| 270 | { |
| 271 | LOCAL_PARA_HDR |
| 272 | kal_uint8 freq_num; |
| 273 | }tl1_ll1_active_measure_status_ind_struct; |
| 274 | |
| 275 | |
| 276 | /***************************************************************************** |
| 277 | * STRUCT |
| 278 | * tl1_ll1_measure_req_struct |
| 279 | * |
| 280 | * DESCRIPTIONS |
| 281 | * This message is sent from TL1 to inform LL1 that how many UMTS TDD frequencies are required to be measured and the measurement purposes in UMTS TDD Standby. |
| 282 | * |
| 283 | * PARAMETERS |
| 284 | * LOCAL_PARA_HDR |
| 285 | * meas_purpose_bitmap - bit 0 for measurement, bit 1 for cell search |
| 286 | * tid - tid for lastest meas_req on (should only change when off) |
| 287 | * tick_bitmap - bit 0 for ranking search, bit 1 for priority search |
| 288 | * freq_num - high priority freqencies when HPS ON, measurement frequencies when HPS OFF |
| 289 | * t_hps - basic period of high priority search (25s,60s,70s) |
| 290 | * is_period_reset_bmp - bit 0 for rank period, 1 means to reset |
| 291 | * - bit 1 for prio period, 0 means not to reset |
| 292 | * - when freq. num is same as before, ll1 will check this flag to reset period or not |
| 293 | * current_time - current in TL1 |
| 294 | *****************************************************************************/ |
| 295 | typedef struct |
| 296 | { |
| 297 | LOCAL_PARA_HDR |
| 298 | kal_uint8 meas_purpose_bitmap; |
| 299 | kal_uint8 tid; |
| 300 | kal_uint8 tick_bitmap; |
| 301 | kal_uint8 freq_num; |
| 302 | kal_uint16 t_hps; |
| 303 | kal_int32 is_period_reset_bmp; |
| 304 | umts_tdd_time_struct current_time; |
| 305 | }tl1_ll1_measure_req_struct; |
| 306 | |
| 307 | /***************************************************************************** |
| 308 | * STRUCT |
| 309 | * tl1_ll1_standby_measure_done_ind_struct |
| 310 | * |
| 311 | * DESCRIPTIONS |
| 312 | * For low power optimization, TL1 informs LL1 which measurement purpose is |
| 313 | * measured done in its period. If all measurement purposes are measured done, |
| 314 | * LL1 will not tick TL1 anymore in shortest measurement period. |
| 315 | * |
| 316 | * PARAMETERS |
| 317 | * LOCAL_PARA_HDR |
| 318 | * tid - For LL1 to know this tid is mapped to which gap pattern period sent before |
| 319 | * tick_bitmap - bit 0 for ranking search, bit 1 for priority search. Only one bit will be set in one message. |
| 320 | *****************************************************************************/ |
| 321 | typedef struct |
| 322 | { |
| 323 | LOCAL_PARA_HDR |
| 324 | kal_uint8 tid; |
| 325 | kal_uint8 tick_bitmap; |
| 326 | }tl1_ll1_standby_measure_done_ind_struct; |
| 327 | |
| 328 | /***************************************************************************** |
| 329 | * STRUCT |
| 330 | * ll1_tl1_gap_service_req_struct |
| 331 | * |
| 332 | * DESCRIPTIONS |
| 333 | * LL1 uses this primitive to enable (disable) active RAT gap service to get (release) |
| 334 | * the free radio frequency period in UMTS TDD.When LL1 disables active RAT gap service, |
| 335 | * it means that UMTS TDD could use all RF time already. |
| 336 | * |
| 337 | * PARAMETERS |
| 338 | * LOCAL_PARA_HDR |
| 339 | * enable - KAL_TRUE : request gap service |
| 340 | * KAL_FALSE : stop gap service |
| 341 | * service_type_bmp - Bit 0 for FB/SB search in GSM |
| 342 | * Bit 1 for LTE meas. |
| 343 | * The value 1 of a bit means that TL1 should provide suitable gap pattern for the corresponding type of measurement. |
| 344 | * Bit 0 is the first/rightmost bit of the bit string. |
| 345 | *****************************************************************************/ |
| 346 | typedef struct |
| 347 | { |
| 348 | LOCAL_PARA_HDR |
| 349 | kal_bool enable; |
| 350 | kal_uint8 service_type_bmp; |
| 351 | }ll1_tl1_gap_service_req_struct; |
| 352 | |
| 353 | |
| 354 | /***************************************************************************** |
| 355 | * STRUCT |
| 356 | * tl1_ll1_gap_stop_cnf_struct |
| 357 | * |
| 358 | * DESCRIPTIONS |
| 359 | * TL1 uses this primitive to confirm LL1_TL1_GAP_STOP_REQ when there is no gap usage in UMTS_TDD.. |
| 360 | * |
| 361 | * PARAMETERS |
| 362 | * LOCAL_PARA_HDR |
| 363 | * current_time - current time in TL1 |
| 364 | *****************************************************************************/ |
| 365 | typedef struct |
| 366 | { |
| 367 | LOCAL_PARA_HDR |
| 368 | umts_tdd_time_struct current_time; |
| 369 | }tl1_ll1_gap_stop_cnf_struct; |
| 370 | |
| 371 | /***************************************************************************** |
| 372 | * STRUCT |
| 373 | * tl1_ll1_auto_gap_req_struct |
| 374 | * |
| 375 | * DESCRIPTIONS |
| 376 | * TL1 sends this message to request LL1 that TL1 wants to use the auto gap from (sub_sfn, echips). |
| 377 | * TL1 could use this auto gap after getting the successful confirm |
| 378 | * |
| 379 | * PARAMETERS |
| 380 | * LOCAL_PARA_HDR |
| 381 | * auto_time - Start time of auto gap in TL1 |
| 382 | *****************************************************************************/ |
| 383 | typedef struct |
| 384 | { |
| 385 | LOCAL_PARA_HDR |
| 386 | umts_tdd_time_struct auto_time; |
| 387 | }tl1_ll1_auto_gap_req_struct; |
| 388 | |
| 389 | /***************************************************************************** |
| 390 | * STRUCT |
| 391 | * ll1_tl1_auto_gap_cnf_struct |
| 392 | * |
| 393 | * DESCRIPTIONS |
| 394 | * LL1 sends this message to confirm TL1 auto gap request. |
| 395 | * After receiving this message, TL1 could use required auto gap. |
| 396 | * |
| 397 | * PARAMETERS |
| 398 | * LOCAL_PARA_HDR |
| 399 | * success - KAL_TRUE : TL1 could use auto gap to search |
| 400 | * KAL_FALSE: TL1 could not use auto gap to search. |
| 401 | * And TL1 should not request auto gap until AUTO_GAP_AVAILABLE_IND |
| 402 | * valid_period - The length of autonomous gap allowed by active RAT |
| 403 | * The value is valid when success = KAL_TRUE |
| 404 | * Unit : echip |
| 405 | *****************************************************************************/ |
| 406 | typedef struct |
| 407 | { |
| 408 | LOCAL_PARA_HDR |
| 409 | kal_bool success; |
| 410 | kal_int32 valid_period; |
| 411 | }ll1_tl1_auto_gap_cnf_struct; |
| 412 | |
| 413 | /***************************************************************************** |
| 414 | * STRUCT |
| 415 | * ll1_tl1_auto_gap_ind_struct |
| 416 | * |
| 417 | * DESCRIPTIONS |
| 418 | * LL1 sends this message to inform TL1 stopping using RF in this auto gap from (sub_sfn, echips). |
| 419 | * |
| 420 | * PARAMETERS |
| 421 | * LOCAL_PARA_HDR |
| 422 | * auto_time - Start time of auto gap |
| 423 | *****************************************************************************/ |
| 424 | typedef struct |
| 425 | { |
| 426 | LOCAL_PARA_HDR |
| 427 | umts_tdd_time_struct auto_time; |
| 428 | }ll1_tl1_auto_gap_ind_struct; |
| 429 | |
| 430 | /***************************************************************************** |
| 431 | * STRUCT |
| 432 | * tl1_ll1_auto_gap_res_struct |
| 433 | * |
| 434 | * DESCRIPTIONS |
| 435 | * TL1 sends this message to response LL1 that TL1 will/won't use RF from |
| 436 | * the start timing of auto gap which is informed by LL1_TL1_AUTO_GAP_IND. |
| 437 | * |
| 438 | * PARAMETERS |
| 439 | * LOCAL_PARA_HDR |
| 440 | * success - KAL_TRUE : TL1 will not use RF from the starting time of LL1_TL1_AUTONOMOIS_GAP_IND |
| 441 | * KAL_FALSE: TL1 may use RF after starting time of LL1_TL1_AUTONOMOIS_GAP_IND. |
| 442 | * valid_period - The length of autonomous gap allowed in TL1 |
| 443 | * The value is valid when TL1 is active rat and success = KAL_TRUE |
| 444 | * Unit : echip |
| 445 | *****************************************************************************/ |
| 446 | typedef struct |
| 447 | { |
| 448 | LOCAL_PARA_HDR |
| 449 | kal_bool success; |
| 450 | kal_int32 valid_period; |
| 451 | }tl1_ll1_auto_gap_res_struct; |
| 452 | |
| 453 | /***************************************************************************** |
| 454 | * STRUCT |
| 455 | * ll1_tl1_gap_notify_ind_struct |
| 456 | * |
| 457 | * DESCRIPTIONS |
| 458 | * LL1 sends this message to inform TL1 that the starting time and length of gap pattern when TL1 is standby RAT. |
| 459 | * |
| 460 | * PARAMETERS |
| 461 | * LOCAL_PARA_HDR |
| 462 | * standby_gap - standby gap pattern |
| 463 | * tid - tid for lastest meas_req on |
| 464 | *****************************************************************************/ |
| 465 | typedef struct |
| 466 | { |
| 467 | LOCAL_PARA_HDR |
| 468 | ll1_tl1_expand_gap_pattern_struct standby_gap; |
| 469 | kal_uint8 tid; /* Tid for lastest meas_req on, LL1 will expand gap notify ind with this tid*/ |
| 470 | }ll1_tl1_gap_notify_ind_struct; |
| 471 | |
| 472 | /***************************************************************************** |
| 473 | * STRUCT |
| 474 | * tl1_ll1_gap_pattern_ind_struct |
| 475 | * |
| 476 | * DESCRIPTIONS |
| 477 | * TL1 sends this message to inform LL1 that the free RF period in TL1 as gap pattern. |
| 478 | * PARAMETERS |
| 479 | * LOCAL_PARA_HDR |
| 480 | * tl1_current_time - TL1 current time |
| 481 | * idle_gap - No matter the length is bigger than zero or not, |
| 482 | * TL1 should send this message and sets is_drx_tick = KAL_TRUE in one DRX period once. |
| 483 | * dch_gap - Gap pattern provided by TL1 in CELL_FACH/CELL_DCH |
| 484 | *****************************************************************************/ |
| 485 | typedef struct |
| 486 | { |
| 487 | LOCAL_PARA_HDR |
| 488 | umts_tdd_time_struct tl1_current_time; |
| 489 | umts_tdd_idle_gap_struct idle_gap; |
| 490 | umts_tdd_connected_gap_struct connect_gap; |
| 491 | }tl1_ll1_gap_pattern_ind_struct; |
| 492 | |
| 493 | /***************************************************************************** |
| 494 | * STRUCT |
| 495 | * ll1_tl1_sync_req_struct |
| 496 | * tl1_ll1_gap_stop_req_struct |
| 497 | * ll1_tl1_gap_stop_cnf_struct |
| 498 | * ll1_tl1_gap_stop_req_struct |
| 499 | * tl1_ll1_gap_suspend_req_struct |
| 500 | * ll1_tl1_gap_suspend_cnf_struct |
| 501 | * ll1_tl1_gap_suspend_req_struct |
| 502 | * tl1_ll1_gap_suspend_cnf_struct |
| 503 | * tl1_ll1_gap_resume_ind_struct |
| 504 | * ll1_tl1_gap_resume_ind_struct |
| 505 | * tl1_ll1_auto_gap_stop_req_struct |
| 506 | * ll1_tl1_auto_gap_stop_ind_struct |
| 507 | * tl1_ll1_auto_gap_stop_res_struct |
| 508 | * ll1_tl1_auto_gap_stop_cnf_struct |
| 509 | * tl1_ll1_auto_gap_end_ind_struct |
| 510 | * ll1_tl1_auto_gap_end_ind_struct |
| 511 | * tl1_ll1_auto_gap_available_ind_struct |
| 512 | * ll1_tl1_auto_gap_available_ind_struct |
| 513 | * |
| 514 | * DESCRIPTIONS |
| 515 | * ll1_tl1_sync_req_struct |
| 516 | * LL1 will use this primitive to get TL1 current UMTS timing and micro |
| 517 | * second counter value in both TL1 in active and standby mode. |
| 518 | * |
| 519 | * tl1_ll1_gap_stop_req_struct |
| 520 | * TL1 uses this primitive to inform LL1 to stop all gap usage in standby |
| 521 | * RAT when GERAN GSM wants to change configuration or other purposes. |
| 522 | * |
| 523 | * ll1_tl1_gap_stop_cnf_struct |
| 524 | * LL1 uses this primitive to confirm TL1 that LL1 has already stopped |
| 525 | * all gap usages in standby RAT and TL1 could use all RF time. |
| 526 | * |
| 527 | * ll1_tl1_gap_stop_req_struct |
| 528 | * LL1 uses this primitive to stop gap usage in UMTS TDD when UMTS TDD is standby RAT. |
| 529 | * |
| 530 | * tl1_ll1_gap_suspend_req_struct |
| 531 | * TL1 uses this primitive to temporal suspend gap usage in standby RAT for higher priority |
| 532 | * task and doesn't need to give new gap configuration in connection mode when resumed. |
| 533 | * |
| 534 | * ll1_tl1_gap_suspend_cnf_struct |
| 535 | * LL1 sends this confirm message to TL1 after all standby RAT gap usage are suspended. |
| 536 | * |
| 537 | * ll1_tl1_gap_suspend_req_struct |
| 538 | * LL1 sends this message to TL1 to request that TL1 suspends RF usage immediately. |
| 539 | * |
| 540 | * tl1_ll1_gap_suspend_cnf_struct |
| 541 | * TL1 sends this message to confirm LL1 that TL1 will not use gap from |
| 542 | * now to receiving resume indicator |
| 543 | * |
| 544 | * tl1_ll1_gap_resume_ind_struct |
| 545 | * TL1 sends this message to inform LL1 that TL1 has already finished |
| 546 | * higher priority task, and standby RAT could use gap normally. |
| 547 | * |
| 548 | * ll1_tl1_gap_resume_ind_struct |
| 549 | * LL1 sends this message to TL1 to resume TL1's gap usage. |
| 550 | * After receiving this message, TL1 could use gap pattern normally. |
| 551 | * |
| 552 | * tl1_ll1_auto_gap_stop_req_struct |
| 553 | * TL1 sends this message to request LL1 that TL1 wants to |
| 554 | * retrieve autonomous gap for higher priority task. |
| 555 | * |
| 556 | * ll1_tl1_auto_gap_stop_ind_struct |
| 557 | * LL1 sends this message to inform TL1 of stopping using RF |
| 558 | * during autonomous gap period. |
| 559 | * |
| 560 | * tl1_ll1_auto_gap_stop_res_struct |
| 561 | * TL1 sends this message to response LL1 that TL1 stops |
| 562 | * autonomous gap usage. |
| 563 | * |
| 564 | * ll1_tl1_auto_gap_stop_cnf_struct |
| 565 | * LL1 sends this message to confirm that TL1 could use RF now. |
| 566 | * |
| 567 | * tl1_ll1_auto_gap_end_ind_struct |
| 568 | * TL1 sends this message to inform LL1 that autonomous gap usage is finished. |
| 569 | * |
| 570 | * ll1_tl1_auto_gap_end_ind_struct |
| 571 | * LL1 sends this message to inform TL1 that autonomous gap usage is finished. |
| 572 | * |
| 573 | * tl1_ll1_auto_gap_available_ind_struct |
| 574 | * TL1 sends this message to inform LL1 that autonomous gap is available now. Standby RAT |
| 575 | * could request autonomous gap now. Standby RAT could request autonomous gap now |
| 576 | * |
| 577 | * ll1_tl1_auto_gap_available_ind_struct |
| 578 | * LL1 sends this message to inform TL1 that autonomous gap |
| 579 | * is available now. TL1 could request autonomous gap now. |
| 580 | * |
| 581 | * tl1_ll1_auto_gap_unavailable_ind_struct |
| 582 | * TL1 sends this message to inform LL1 that auto gap is unavailable now. |
| 583 | * Standby RAT could not request auto gap now. |
| 584 | * |
| 585 | * ll1_tl1_auto_gap_unavailable_ind_struct |
| 586 | * LL1 sends this message to inform TL1 that auto gap is unavailable now. |
| 587 | * TL1 could not request auto gap now. |
| 588 | * |
| 589 | * PARAMETERS |
| 590 | * LOCAL_PARA_HDR |
| 591 | *****************************************************************************/ |
| 592 | typedef struct |
| 593 | { |
| 594 | LOCAL_PARA_HDR |
| 595 | }ll1_tl1_sync_req_struct, |
| 596 | tl1_ll1_gap_stop_req_struct, |
| 597 | ll1_tl1_gap_stop_cnf_struct, |
| 598 | ll1_tl1_gap_stop_req_struct, |
| 599 | tl1_ll1_gap_suspend_req_struct, |
| 600 | ll1_tl1_gap_suspend_cnf_struct, |
| 601 | ll1_tl1_gap_suspend_req_struct, |
| 602 | tl1_ll1_gap_suspend_cnf_struct, |
| 603 | tl1_ll1_gap_resume_ind_struct, |
| 604 | ll1_tl1_gap_resume_ind_struct, |
| 605 | tl1_ll1_auto_gap_stop_req_struct, |
| 606 | ll1_tl1_auto_gap_stop_ind_struct, |
| 607 | tl1_ll1_auto_gap_stop_res_struct, |
| 608 | ll1_tl1_auto_gap_stop_cnf_struct, |
| 609 | tl1_ll1_auto_gap_end_ind_struct, |
| 610 | ll1_tl1_auto_gap_end_ind_struct, |
| 611 | tl1_ll1_auto_gap_available_ind_struct, |
| 612 | ll1_tl1_auto_gap_available_ind_struct, |
| 613 | tl1_ll1_auto_gap_unavailable_ind_struct, |
| 614 | ll1_tl1_auto_gap_unavailable_ind_struct; |
| 615 | #if 0 |
| 616 | /* under construction !*/ |
| 617 | /* under construction !*/ |
| 618 | /* under construction !*/ |
| 619 | /* under construction !*/ |
| 620 | /* under construction !*/ |
| 621 | /* under construction !*/ |
| 622 | /* under construction !*/ |
| 623 | /* under construction !*/ |
| 624 | /* under construction !*/ |
| 625 | /* under construction !*/ |
| 626 | /* under construction !*/ |
| 627 | /* under construction !*/ |
| 628 | /* under construction !*/ |
| 629 | /* under construction !*/ |
| 630 | /* under construction !*/ |
| 631 | /* under construction !*/ |
| 632 | /* under construction !*/ |
| 633 | /* under construction !*/ |
| 634 | /* under construction !*/ |
| 635 | /* under construction !*/ |
| 636 | /* under construction !*/ |
| 637 | /* under construction !*/ |
| 638 | /* under construction !*/ |
| 639 | /* under construction !*/ |
| 640 | /* under construction !*/ |
| 641 | /* under construction !*/ |
| 642 | /* under construction !*/ |
| 643 | /* under construction !*/ |
| 644 | /* under construction !*/ |
| 645 | /* under construction !*/ |
| 646 | /* under construction !*/ |
| 647 | /* under construction !*/ |
| 648 | /* under construction !*/ |
| 649 | /* under construction !*/ |
| 650 | /* under construction !*/ |
| 651 | #endif /*__POP_FSM__*/ |
| 652 | /***************************************************************************** |
| 653 | * STRUCT |
| 654 | * mll1_tl1_info_database_struct |
| 655 | * |
| 656 | * DESCRIPTIONS |
| 657 | * TL1 information structure. |
| 658 | * |
| 659 | * PARAMETERS |
| 660 | * |
| 661 | *****************************************************************************/ |
| 662 | typedef struct |
| 663 | { /* measure req*/ |
| 664 | kal_uint8 tick_bmp; /* use to record tick bitmap*/ |
| 665 | kal_uint8 rank_tick_tid; /* tid for rank tick*/ |
| 666 | kal_uint8 prio_tick_tid; /* tid for prio tick*/ |
| 667 | kal_uint8 meas_done_bmp; /* measurement done ind bitmap*/ |
| 668 | kal_bool is_meas_done_useful; /* umts tdd uses meas_done or not by checking meas_purpose_bmp*/ |
| 669 | kal_uint8 meas_purpose_bitmap; /* record the measure purpose bitmap*/ |
| 670 | umts_tdd_time_struct current_time; /* umts tdd current time when request gap service*/ |
| 671 | /* Paging period in active RAT */ |
| 672 | kal_int32 drx_cycle; /* 80,160,320,640,1280,2560,5120 Unit : ms*/ |
| 673 | /* auto gap para*/ |
| 674 | umts_tdd_time_struct auto_time; /* auto gap time*/ |
| 675 | /* Mode status*/ |
| 676 | ll1_active_rat_mode_status_enum mode_status; /* mode status*/ |
| 677 | /* GAP pattern*/ |
| 678 | tl1_ll1_gap_pattern_ind_struct gap_pattern; /* Gap pattern */ |
| 679 | /* Gap request from standby rat should do sync in connection*/ |
| 680 | kal_bool valid_timing; /* KAL_TRUE : with valid timing*/ |
| 681 | /* KAL_FALSE : with invalid timing*/ |
| 682 | kal_uint16 dmo_lte_len; /* length of dmo for lte*/ |
| 683 | kal_uint16 dmo_lte_period; /* period of dmo for lte*/ |
| 684 | kal_uint8 meas_req_tid; /* Tid for lastest meas_req on, LL1 will expand gap notify ind with this tid*/ |
| 685 | }mll1_tl1_info_database_struct; |
| 686 | |
| 687 | /***************************************************************************** |
| 688 | * GLOBAL FUNCTIONS |
| 689 | *****************************************************************************/ |
| 690 | |
| 691 | |
| 692 | /***************************************************************************** |
| 693 | * FUNCTION |
| 694 | * mll1_tick_tl1_gap_expansion |
| 695 | * DESCRIPTION |
| 696 | * tick tl1 to expand gap when sync done |
| 697 | * |
| 698 | * PARAMETERS |
| 699 | * none |
| 700 | * RETURNS |
| 701 | * none |
| 702 | * GLOBALS AFFECTED |
| 703 | * none |
| 704 | *****************************************************************************/ |
| 705 | void mll1_tick_tl1_gap_expansion(void); |
| 706 | |
| 707 | /***************************************************************************** |
| 708 | * FUNCTION |
| 709 | * mll1_tl1_auto_gap_available_ind |
| 710 | * DESCRIPTION |
| 711 | * ll1 sends auto gap available ind to UMTS TDD now |
| 712 | * |
| 713 | * PARAMETERS |
| 714 | * kal_bool available |
| 715 | * RETURNS |
| 716 | * none |
| 717 | * GLOBALS AFFECTED |
| 718 | * none |
| 719 | *****************************************************************************/ |
| 720 | void mll1_tl1_auto_gap_available_ind(kal_bool available); |
| 721 | |
| 722 | /***************************************************************************** |
| 723 | * FUNCTION |
| 724 | * mll1_tl1_auto_gap_cnf |
| 725 | * DESCRIPTION |
| 726 | * ll1 sends auto gap cnf to UMTS_TDD now |
| 727 | * |
| 728 | * PARAMETERS |
| 729 | * success - success or not |
| 730 | * RETURNS |
| 731 | * none |
| 732 | * GLOBALS AFFECTED |
| 733 | * none |
| 734 | *****************************************************************************/ |
| 735 | void mll1_tl1_auto_gap_cnf(kal_bool success,kal_int32 valid_period); |
| 736 | |
| 737 | /***************************************************************************** |
| 738 | * FUNCTION |
| 739 | * mll1_tl1_auto_gap_end_ind |
| 740 | * DESCRIPTION |
| 741 | * ll1 sends auto gap end ind to UMTS TDD now |
| 742 | * |
| 743 | * PARAMETERS |
| 744 | * none |
| 745 | * RETURNS |
| 746 | * none |
| 747 | * GLOBALS AFFECTED |
| 748 | * none |
| 749 | *****************************************************************************/ |
| 750 | void mll1_tl1_auto_gap_end_ind(void); |
| 751 | |
| 752 | /***************************************************************************** |
| 753 | * FUNCTION |
| 754 | * mll1_tl1_auto_gap_ind |
| 755 | * DESCRIPTION |
| 756 | * ll1 sends auto gap end ind to UMTS TDD now |
| 757 | * |
| 758 | * PARAMETERS |
| 759 | * tdd_time - auto time |
| 760 | * RETURNS |
| 761 | * none |
| 762 | * GLOBALS AFFECTED |
| 763 | * none |
| 764 | *****************************************************************************/ |
| 765 | void mll1_tl1_auto_gap_ind(umts_tdd_time_struct tdd_time); |
| 766 | |
| 767 | /***************************************************************************** |
| 768 | * FUNCTION |
| 769 | * mll1_tl1_auto_gap_stop_cnf |
| 770 | * DESCRIPTION |
| 771 | * ll1 sends auto gap stop cnf to UMTS_TDD now |
| 772 | * |
| 773 | * PARAMETERS |
| 774 | * None |
| 775 | * RETURNS |
| 776 | * none |
| 777 | * GLOBALS AFFECTED |
| 778 | * none |
| 779 | *****************************************************************************/ |
| 780 | void mll1_tl1_auto_gap_stop_cnf(void); |
| 781 | |
| 782 | /***************************************************************************** |
| 783 | * FUNCTION |
| 784 | * mll1_tl1_auto_gap_stop_ind |
| 785 | * DESCRIPTION |
| 786 | * ll1 sends auto gap stop ind to UMTS_TDD now |
| 787 | * |
| 788 | * PARAMETERS |
| 789 | * None |
| 790 | * RETURNS |
| 791 | * none |
| 792 | * GLOBALS AFFECTED |
| 793 | * none |
| 794 | *****************************************************************************/ |
| 795 | void mll1_tl1_auto_gap_stop_ind(void); |
| 796 | |
| 797 | /***************************************************************************** |
| 798 | * FUNCTION |
| 799 | * mll1_tl1_auto_time_minus |
| 800 | * DESCRIPTION |
| 801 | * Add more rf margin for any standby rat which will enter sleep during autonomous serch procedure |
| 802 | * Assume margin is smaller than one sub_sfn |
| 803 | * PARAMETERS |
| 804 | * umts_tdd_time_struct* |
| 805 | * kal_int32 - more RF margin (recovery from sleep). |
| 806 | * RETURNS |
| 807 | * void |
| 808 | *****************************************************************************/ |
| 809 | void mll1_tl1_auto_time_minus(umts_tdd_time_struct* time, kal_int32 echip); |
| 810 | |
| 811 | /***************************************************************************** |
| 812 | * FUNCTION |
| 813 | * mll1_tl1_expand_gap_pattern_ind |
| 814 | * DESCRIPTION |
| 815 | * ll1 sends auto gap available ind to UMTS TDD now |
| 816 | * |
| 817 | * PARAMETERS |
| 818 | * standby_gap - gap pattern for umts tdd |
| 819 | * RETURNS |
| 820 | * none |
| 821 | * GLOBALS AFFECTED |
| 822 | * none |
| 823 | *****************************************************************************/ |
| 824 | void mll1_tl1_expand_gap_pattern_ind(ll1_tl1_expand_gap_pattern_struct* standby_gap); |
| 825 | |
| 826 | /***************************************************************************** |
| 827 | * FUNCTION |
| 828 | * mll1_tl1_gap_resume_ind |
| 829 | * DESCRIPTION |
| 830 | * LL1 sends this message to TL1 to resume TL1's gap usage. |
| 831 | * After receiving this message, TL1 could use gap pattern normally. |
| 832 | * |
| 833 | * PARAMETERS |
| 834 | * none |
| 835 | * RETURNS |
| 836 | * none |
| 837 | * GLOBALS AFFECTED |
| 838 | * none |
| 839 | *****************************************************************************/ |
| 840 | void mll1_tl1_gap_resume_ind(void); |
| 841 | |
| 842 | /***************************************************************************** |
| 843 | * FUNCTION |
| 844 | * mll1_tl1_gap_service_req |
| 845 | * DESCRIPTION |
| 846 | * ll1 sends gap service req to UMTS_TDD now |
| 847 | * |
| 848 | * PARAMETERS |
| 849 | * enable - KAL_TRUE : turn on gap service |
| 850 | * - KAL_FALSE : turn off gap service |
| 851 | * service_type_bmp - Bit 0 for FB/SB search in GSM |
| 852 | * Bit 1 for LTE meas. |
| 853 | * The value 1 of a bit means that TL1 should provide suitable gap pattern for the corresponding type of measurement. |
| 854 | * Bit 0 is the first/rightmost bit of the bit string. |
| 855 | * RETURNS |
| 856 | * none |
| 857 | * GLOBALS AFFECTED |
| 858 | * none |
| 859 | *****************************************************************************/ |
| 860 | void mll1_tl1_gap_service_req(kal_bool enable, kal_uint8 service_type_bmp); |
| 861 | |
| 862 | /***************************************************************************** |
| 863 | * FUNCTION |
| 864 | * mll1_tl1_gap_stop_cnf |
| 865 | * DESCRIPTION |
| 866 | * LL1 uses this primitive to confirm TL1 that LL1 has already stopped |
| 867 | * all gap usages in standby RAT and TL1 could use all RF time. |
| 868 | * |
| 869 | * PARAMETERS |
| 870 | * NONE |
| 871 | * RETURNS |
| 872 | * none |
| 873 | * GLOBALS AFFECTED |
| 874 | * none |
| 875 | *****************************************************************************/ |
| 876 | void mll1_tl1_gap_stop_cnf(void); |
| 877 | |
| 878 | /***************************************************************************** |
| 879 | * FUNCTION |
| 880 | * mll1_tl1_gap_stop_req |
| 881 | * DESCRIPTION |
| 882 | * LL1 uses this primitive to stop gap usage in UMTS TDD when UMTS TDD is standby RAT. |
| 883 | * |
| 884 | * PARAMETERS |
| 885 | * NONE |
| 886 | * RETURNS |
| 887 | * none |
| 888 | * GLOBALS AFFECTED |
| 889 | * none |
| 890 | *****************************************************************************/ |
| 891 | void mll1_tl1_gap_stop_req(void); |
| 892 | |
| 893 | /***************************************************************************** |
| 894 | * FUNCTION |
| 895 | * mll1_tl1_gap_suspend_cnf |
| 896 | * DESCRIPTION |
| 897 | * LL1 sends this confirm message to TL1 after gap usage in standby RAT is suspended. |
| 898 | * TL1 could use RF only after getting this message. |
| 899 | * |
| 900 | * PARAMETERS |
| 901 | * NONE |
| 902 | * RETURNS |
| 903 | * none |
| 904 | * GLOBALS AFFECTED |
| 905 | * none |
| 906 | *****************************************************************************/ |
| 907 | void mll1_tl1_gap_suspend_cnf(void); |
| 908 | |
| 909 | /***************************************************************************** |
| 910 | * FUNCTION |
| 911 | * mll1_tl1_gap_suspend_req |
| 912 | * DESCRIPTION |
| 913 | * LL1 uses this primitive to suspend gap usage in UMTS TDD when UMTS TDD is standby RAT. |
| 914 | * |
| 915 | * PARAMETERS |
| 916 | * NONE |
| 917 | * RETURNS |
| 918 | * none |
| 919 | * GLOBALS AFFECTED |
| 920 | * none |
| 921 | *****************************************************************************/ |
| 922 | void mll1_tl1_gap_suspend_req(void); |
| 923 | |
| 924 | /***************************************************************************** |
| 925 | * FUNCTION |
| 926 | * mll1_tl1_get_auto_time |
| 927 | * DESCRIPTION |
| 928 | * return auto time from TL1 |
| 929 | * |
| 930 | * PARAMETERS |
| 931 | * None |
| 932 | * RETURNS |
| 933 | * umts_tdd_time_struct auto_time |
| 934 | *****************************************************************************/ |
| 935 | umts_tdd_time_struct mll1_tl1_get_auto_time(void); |
| 936 | |
| 937 | |
| 938 | /***************************************************************************** |
| 939 | * FUNCTION |
| 940 | * mll1_tl1_get_current_time |
| 941 | * DESCRIPTION |
| 942 | * ll1 gets current time + ahead margin to expand gap |
| 943 | * |
| 944 | * PARAMETERS |
| 945 | * umts_tdd_time - start time of expansion period |
| 946 | * kal_bool is_ahead_time |
| 947 | * TRUE : advance eutran_time with the predefined ahead_time |
| 948 | * FALSE: don't advance eutran_time with the predefined ahead_time |
| 949 | * RETURNS |
| 950 | * none |
| 951 | * GLOBALS AFFECTED |
| 952 | * none |
| 953 | *****************************************************************************/ |
| 954 | void mll1_tl1_get_current_time(umts_tdd_time_struct* tdd_time, kal_bool is_ahead_time); |
| 955 | |
| 956 | /***************************************************************************** |
| 957 | * FUNCTION |
| 958 | * mll1_tl1_get_dmo_para |
| 959 | * DESCRIPTION |
| 960 | * return length , period of dmo for lte from TL1 |
| 961 | * |
| 962 | * PARAMETERS |
| 963 | * *length |
| 964 | * *period |
| 965 | * RETURNS |
| 966 | * none |
| 967 | *****************************************************************************/ |
| 968 | void mll1_tl1_get_dmo_para(kal_uint16* length,kal_uint16* period); |
| 969 | |
| 970 | #ifdef __LTE_RAT__ |
| 971 | /***************************************************************************** |
| 972 | * FUNCTION |
| 973 | * mll1_tl1_get_el1_rf_margin |
| 974 | * DESCRIPTION |
| 975 | * TL1 gets EL1 RF margin in current state |
| 976 | * |
| 977 | * PARAMETERS |
| 978 | * head - header_margin |
| 979 | * tail - tail_margin |
| 980 | * RETURNS |
| 981 | * none |
| 982 | *****************************************************************************/ |
| 983 | void mll1_tl1_get_el1_rf_margin(kal_int32* head,kal_int32* tail); |
| 984 | #endif /*__LTE_RAT__*/ |
| 985 | |
| 986 | #ifdef __GSM_RAT__ |
| 987 | /***************************************************************************** |
| 988 | * FUNCTION |
| 989 | * mll1_tl1_get_gl1_rf_margin |
| 990 | * DESCRIPTION |
| 991 | * TL1 gets GL1 RF margin in current state |
| 992 | * |
| 993 | * PARAMETERS |
| 994 | * head - header_margin |
| 995 | * tail - tail_margin |
| 996 | * st_slot - gap start slot in DCH |
| 997 | * len - gap len in DCH |
| 998 | * RETURNS |
| 999 | * none |
| 1000 | *****************************************************************************/ |
| 1001 | void mll1_tl1_get_gl1_rf_margin(kal_int32* head,kal_int32* tail, kal_int32 st_slot, kal_int32 len); |
| 1002 | #endif /*__GSM_RAT__*/ |
| 1003 | |
| 1004 | /***************************************************************************** |
| 1005 | * FUNCTION |
| 1006 | * mll1_tl1_get_mode_status |
| 1007 | * DESCRIPTION |
| 1008 | * return mode status from TL1 |
| 1009 | * |
| 1010 | * PARAMETERS |
| 1011 | * None |
| 1012 | * RETURNS |
| 1013 | * ll1_active_rat_mode_status_enum mode_status |
| 1014 | *****************************************************************************/ |
| 1015 | ll1_active_rat_mode_status_enum mll1_tl1_get_mode_status(void); |
| 1016 | |
| 1017 | /***************************************************************************** |
| 1018 | * FUNCTION |
| 1019 | * mll1_tl1_get_tick_count |
| 1020 | * DESCRIPTION |
| 1021 | * TL1 tick number |
| 1022 | * |
| 1023 | * PARAMETERS |
| 1024 | * is_prio_search - KAL_FALSE : ll1_main wants to get meas. tick |
| 1025 | * KAL_TRUE : ll1_main wants to get prio. tick |
| 1026 | * t_hps - 60 (uint : second) |
| 1027 | * |
| 1028 | * RETURNS |
| 1029 | * kal_uint32 count; |
| 1030 | *****************************************************************************/ |
| 1031 | kal_uint32 mll1_tl1_get_tick_count(kal_bool is_prio_search, kal_uint16 t_hps); |
| 1032 | |
| 1033 | /***************************************************************************** |
| 1034 | * FUNCTION |
| 1035 | * mll1_tl1_get_timing_status |
| 1036 | * DESCRIPTION |
| 1037 | * |
| 1038 | * PARAMETERS |
| 1039 | * RETURNS |
| 1040 | * kal_bool - valid_timing KAL_TRUE : with valid timing |
| 1041 | * KAL_FALSE : with invalid timing |
| 1042 | * GLOBALS AFFECTED |
| 1043 | * none |
| 1044 | *****************************************************************************/ |
| 1045 | kal_bool mll1_tl1_get_timing_status(void); |
| 1046 | |
| 1047 | /***************************************************************************** |
| 1048 | * FUNCTION |
| 1049 | * mll1_tl1_get_tl1_rf_margin |
| 1050 | * DESCRIPTION |
| 1051 | * TL1 gets RF margin in current state |
| 1052 | * |
| 1053 | * PARAMETERS |
| 1054 | * head - header_margin |
| 1055 | * tail - tail_margin |
| 1056 | * RETURNS |
| 1057 | * none |
| 1058 | *****************************************************************************/ |
| 1059 | void mll1_tl1_get_tl1_rf_margin(kal_int32* head,kal_int32* tail); |
| 1060 | |
| 1061 | /***************************************************************************** |
| 1062 | * FUNCTION |
| 1063 | * mll1_tl1_is_lower_pwr_on |
| 1064 | * DESCRIPTION |
| 1065 | * Check if tl1 is low pwr on |
| 1066 | * |
| 1067 | * PARAMETERS |
| 1068 | * |
| 1069 | * RETURNS |
| 1070 | * kal_bool - KAL_FALSE : measurement is not finished and need gap in this period |
| 1071 | * KAL_TRUE : measurement is finished and doesnt need gap in this period |
| 1072 | *****************************************************************************/ |
| 1073 | kal_bool mll1_tl1_is_lower_pwr_on(void); |
| 1074 | |
| 1075 | /***************************************************************************** |
| 1076 | * FUNCTION |
| 1077 | * mll1_tl1_mode_status_update_ind |
| 1078 | * DESCRIPTION |
| 1079 | * This message is sent to TL1 for informing that mode status of active RAT when TL1 is standby RAT. |
| 1080 | * This message should be updated for TL1 in standby when any mode status changed in active RAT. |
| 1081 | * |
| 1082 | * PARAMETERS |
| 1083 | * status - mode status in active RAT |
| 1084 | * RETURNS |
| 1085 | * none |
| 1086 | * GLOBALS AFFECTED |
| 1087 | * none |
| 1088 | *****************************************************************************/ |
| 1089 | void mll1_tl1_mode_status_update_ind(ll1_active_rat_mode_status_enum status); |
| 1090 | |
| 1091 | |
| 1092 | /***************************************************************************** |
| 1093 | * FUNCTION |
| 1094 | * mll1_tl1_set_purpose_for_expansion_period |
| 1095 | * DESCRIPTION |
| 1096 | * |
| 1097 | * PARAMETERS |
| 1098 | * kal_uint32** m - two dimension array of gap purposes |
| 1099 | * kal_int32 st_subsfn - starting time of expansion period |
| 1100 | * RETURNS |
| 1101 | * none |
| 1102 | * GLOBALS AFFECTED |
| 1103 | * none |
| 1104 | *****************************************************************************/ |
| 1105 | void mll1_tl1_set_purpose_for_expansion_period(kal_uint32** m, kal_int32 st_subsfn); |
| 1106 | |
| 1107 | /***************************************************************************** |
| 1108 | * FUNCTION |
| 1109 | * mll1_tl1_set_timing_status |
| 1110 | * DESCRIPTION |
| 1111 | * |
| 1112 | * PARAMETERS |
| 1113 | * flag - set valid_timing = flag |
| 1114 | * RETURNS |
| 1115 | * none |
| 1116 | * GLOBALS AFFECTED |
| 1117 | * none |
| 1118 | *****************************************************************************/ |
| 1119 | void mll1_tl1_set_timing_status(kal_bool flag); |
| 1120 | |
| 1121 | /***************************************************************************** |
| 1122 | * FUNCTION |
| 1123 | * mll1_tl1_sync_time_req |
| 1124 | * DESCRIPTION |
| 1125 | * When timing synchronization procedure is triggered, mll1 will decide which rat should do |
| 1126 | * timing synchronization based on the result of g_ll1_flight_rat|| g_ll1_standby_rat || g_ll1_active_rat. |
| 1127 | * |
| 1128 | * PARAMETERS |
| 1129 | * RETURNS |
| 1130 | * none |
| 1131 | * GLOBALS AFFECTED |
| 1132 | * none |
| 1133 | *****************************************************************************/ |
| 1134 | void mll1_tl1_sync_time_req(void); |
| 1135 | |
| 1136 | /***************************************************************************** |
| 1137 | * FUNCTION |
| 1138 | * mll1_tl1_time_add |
| 1139 | * DESCRIPTION |
| 1140 | * This function is used to add echips to time |
| 1141 | * |
| 1142 | * PARAMETERS |
| 1143 | * time - basic time |
| 1144 | * echips - echips |
| 1145 | * RETURNS |
| 1146 | * none |
| 1147 | *****************************************************************************/ |
| 1148 | void mll1_tl1_time_add( umts_tdd_time_struct* time, kal_int32 echips); |
| 1149 | |
| 1150 | /***************************************************************************** |
| 1151 | * FUNCTION |
| 1152 | * mll1_tl1_update_current_time |
| 1153 | * DESCRIPTION |
| 1154 | * ll1 updates current time after timing sync. done |
| 1155 | * |
| 1156 | * PARAMETERS |
| 1157 | * umts_tdd_time - current time |
| 1158 | * RETURNS |
| 1159 | * none |
| 1160 | * GLOBALS AFFECTED |
| 1161 | * none |
| 1162 | *****************************************************************************/ |
| 1163 | void mll1_tl1_update_current_time(umts_tdd_time_struct* tdd_time); |
| 1164 | |
| 1165 | /***************************************************************************** |
| 1166 | * CALL FUNCTION PROTOTYPE |
| 1167 | * mll1_umts_tdd_handler() |
| 1168 | * |
| 1169 | * DESCRIPTION |
| 1170 | * Function to handle the primitive from TL1. |
| 1171 | * |
| 1172 | * PARAMETERS |
| 1173 | * current_ilm - primitive from TL1. |
| 1174 | * |
| 1175 | * RETURN |
| 1176 | * None |
| 1177 | *****************************************************************************/ |
| 1178 | void mll1_umts_tdd_handler(void *ptr_ilm); |
| 1179 | |
| 1180 | /***************************************************************************** |
| 1181 | * FUNCTION |
| 1182 | * mll1_tl1_info_init |
| 1183 | * DESCRIPTION |
| 1184 | * Initialize tl1 internal global variable |
| 1185 | * |
| 1186 | * PARAMETERS |
| 1187 | * none |
| 1188 | * RETURNS |
| 1189 | * none |
| 1190 | *****************************************************************************/ |
| 1191 | void mll1_tdd_info_init(void); |
| 1192 | |
| 1193 | /***************************************************************************** |
| 1194 | * FUNCTION |
| 1195 | * mll1_tl1_gap_pattern_timing_checking |
| 1196 | * DESCRIPTION |
| 1197 | * check if the pending gap is out of date or not |
| 1198 | * |
| 1199 | * PARAMETERS |
| 1200 | * umts_tdd_time - tl1 timing correspond to some standby rat's timing indicated in measure request |
| 1201 | * RETURNS |
| 1202 | * TRUE - the pending gap has not been out of date |
| 1203 | * FALSE - the pending gap has been out of date |
| 1204 | * GLOBALS AFFECTED |
| 1205 | * none |
| 1206 | *****************************************************************************/ |
| 1207 | kal_bool mll1_tl1_gap_pattern_timing_checking(umts_tdd_time_struct umts_tdd_time); |
| 1208 | |
| 1209 | #endif /*_MLL1_UMTS_TDD_H*/ |