Skip to content
Snippets Groups Projects

add debug logs for failed connection CMDU

4 files
+ 68
0
Compare changes
  • Side-by-side
  • Inline

Files

@@ -1395,3 +1395,41 @@ bool validate_bss_configuration_result(struct cmdu_buff *cmdu,
@@ -1395,3 +1395,41 @@ bool validate_bss_configuration_result(struct cmdu_buff *cmdu,
}
}
#endif /* EASYMESH_VERSION > 2 */
#endif /* EASYMESH_VERSION > 2 */
 
 
bool validate_failed_connection_msg(struct cmdu_buff *cmdu, struct tlv *tv[][16])
 
{
 
int ret;
 
struct tlv_policy c_policy[] = {
 
[0] = {
 
.type = MAP_TLV_STA_MAC_ADDRESS,
 
.present = TLV_PRESENT_ONE,
 
.minlen = 6,
 
.maxlen = 6
 
},
 
[1] = {
 
.type = MAP_TLV_STATUS_CODE,
 
.present = TLV_PRESENT_ONE,
 
.minlen = 2,
 
.maxlen = 2
 
},
 
[2] = {
 
.type = MAP_TLV_REASON_CODE,
 
.present = TLV_PRESENT_MORE,
 
.minlen = 2,
 
.maxlen = 2
 
}
 
};
 
 
ret = cmdu_parse_tlvs(cmdu, tv, c_policy, 3);
 
if (ret) {
 
dbg("%s: parse_tlv failed\n", __func__);
 
return false;
 
}
 
 
if (!tv[0][0] || !tv[1][0]) {
 
dbg("%s: mandatory tlv missing\n", __func__);
 
return false;
 
}
 
 
return true;
 
}
Loading