Skip to content
Snippets Groups Projects
Commit cd4e99b0 authored by Nevadita's avatar Nevadita
Browse files

map-controller: Adding debug trace for channel preference

parent fda08cd4
Branches
No related tags found
1 merge request!2Added Changes for ticket 3595 section 8.1
Pipeline #5099 failed
...@@ -170,6 +170,50 @@ int debug_ap_caps_report(void *cntlr, struct cmdu_cstruct *cmdu) ...@@ -170,6 +170,50 @@ int debug_ap_caps_report(void *cntlr, struct cmdu_cstruct *cmdu)
int debug_channel_pref_report(void *cntlr, struct cmdu_cstruct *cmdu) int debug_channel_pref_report(void *cntlr, struct cmdu_cstruct *cmdu)
{ {
trace("%s: --->\n", __func__); trace("%s: --->\n", __func__);
trace("parsing channel pref of |%s:" MACFMT "|\n", cmdu->intf_name,
MAC2STR(cmdu->origin));
int i, j, k;
uint8_t *tlv = NULL;
for (i = 0; i < cmdu->num_tlvs; i++) {
tlv = (uint8_t *) cmdu->tlvs[i];
trace("CMDU type: %s\n", map_stringify_tlv_type(*tlv));
switch (*tlv) {
case MAP_TLV_CHANNEL_PREFERENCE:
{
struct tlv_channel_pref *p =
(struct tlv_channel_pref *)tlv;
trace("\tradio_id: " MACFMT "\n",
MAC2STR(p->radio_id));
trace("\tch_preference_op_class_nr: %d\n",
p->ch_preference_op_class_nr);
for (j = 0; j < p->ch_preference_op_class_nr;
j++) {
trace("\t\top_class: %d\n",
p->op_class[j].op_class);
trace("\t\tnon_op_ch_nr: %d\n",
p->op_class[j].channel_nr);
//for (k = 0; k < p->operating_class[j].channel_nr; k++)
// trace("\t\t\tchannel: %d\n",
// p->operating_class[j].channel_list[k]);
trace("\t\tpreference: %d\n",
p->op_class[j].preference);
trace("\t\tpreference_reason: %d\n",
p->op_class[j].preference_reason);
}
break;
}
default:
fprintf(stdout, "unknown TLV in CMDU:|%s|",
map_stringify_cmdu_type(cmdu->message_type));
break;
}
trace("\n");
}
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment