FreeCalypso > hg > fc-selenite
comparison src/g23m-gprs/llc/llc.h @ 68:be5b218f0765
src/g23m-gprs/llc: fixed many invalid uses of ##
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 20 Jul 2018 00:51:15 +0000 |
parents | d393cd9bb723 |
children |
comparison
equal
deleted
inserted
replaced
67:c7af699af1c4 | 68:be5b218f0765 |
---|---|
291 SWITCH_SERVICE (llc, t200, UIMAP(s)); | 291 SWITCH_SERVICE (llc, t200, UIMAP(s)); |
292 | 292 |
293 /* | 293 /* |
294 * Switch service s of entity e to use incarnation i. | 294 * Switch service s of entity e to use incarnation i. |
295 */ | 295 */ |
296 #define SWITCH_SERVICE(e,s,i) e##_data->##s = &(##e##_data->##s##_base[i]); | 296 #define SWITCH_SERVICE(e,s,i) e##_data->s = &(e##_data->s##_base[i]); |
297 | 297 |
298 /* | 298 /* |
299 * Switch LLC layer parameter p to incarnation i. | 299 * Switch LLC layer parameter p to incarnation i. |
300 */ | 300 */ |
301 #define SWITCH_PARAM(p,i) llc_data->##p = &(llc_data->##p##_base[i]); | 301 #define SWITCH_PARAM(p,i) llc_data->p = &(llc_data->p##_base[i]); |
302 | 302 |
303 | 303 |
304 /* | 304 /* |
305 * Map SAPI to incarnation, for either acknowledged (4 incarnations) or | 305 * Map SAPI to incarnation, for either acknowledged (4 incarnations) or |
306 * unacknowledged operation (6 incarnations) | 306 * unacknowledged operation (6 incarnations) |
343 | 343 |
344 /* | 344 /* |
345 * Tag XID parameter if requested to negotiate | 345 * Tag XID parameter if requested to negotiate |
346 */ | 346 */ |
347 #define TAG_IF_REQUESTED(V,P) \ | 347 #define TAG_IF_REQUESTED(V,P) \ |
348 if (llc_data->##V##valid) \ | 348 if (llc_data->V valid) \ |
349 { \ | 349 { \ |
350 llc_data->u->xid_tag |= (0x00000001L << P); \ | 350 llc_data->u->xid_tag |= (0x00000001L << P); \ |
351 } | 351 } |
352 | 352 |
353 /* | 353 /* |
354 * Tag XID parameter if requested to negotiate and sense of negotiation fits | 354 * Tag XID parameter if requested to negotiate and sense of negotiation fits |
355 */ | 355 */ |
356 #define TAG_IF_REQUESTED_RSP(S,V,P) \ | 356 #define TAG_IF_REQUESTED_RSP(S,V,P) \ |
357 if (llc_data->u->requested_xid.##V##.valid) \ | 357 if (llc_data->u->requested_xid.V.valid) \ |
358 { \ | 358 { \ |
359 if (llc_data->decoded_xid.##V##.valid) \ | 359 if (llc_data->decoded_xid.V.valid) \ |
360 { \ | 360 { \ |
361 /* simple add parameter. Sense of negotiation is already checked */ \ | 361 /* simple add parameter. Sense of negotiation is already checked */ \ |
362 llc_data->u->xid_tag |= (0x00000001L << P); \ | 362 llc_data->u->xid_tag |= (0x00000001L << P); \ |
363 } \ | 363 } \ |
364 else \ | 364 else \ |
365 { \ | 365 { \ |
366 /* Sense of negotiation compared with current values */ \ | 366 /* Sense of negotiation compared with current values */ \ |
367 if (llc_data->u->requested_xid.##V##.value S *(llc_data->##V)) \ | 367 if (llc_data->u->requested_xid.V.value S *(llc_data->V)) \ |
368 { \ | 368 { \ |
369 llc_data->u->xid_tag |= (0x00000001L << P); \ | 369 llc_data->u->xid_tag |= (0x00000001L << P); \ |
370 } \ | 370 } \ |
371 } \ | 371 } \ |
372 } | 372 } |