@@ -319,7 +319,7 @@ bool ws_wh_utt_read(uint8_t *data, uint16_t length, struct ws_utt_ie *utt_ie)
319
319
{
320
320
mac_header_IE_t utt_ie_data ;
321
321
utt_ie_data .id = MAC_HEADER_ASSIGNED_EXTERNAL_ORG_IE_ID ;
322
- if (4 != mac_ie_header_sub_id_discover (data , length , & utt_ie_data , WH_IE_UTT_TYPE )) {
322
+ if (4 > mac_ie_header_sub_id_discover (data , length , & utt_ie_data , WH_IE_UTT_TYPE )) {
323
323
// NO UTT header
324
324
return false;
325
325
}
@@ -333,7 +333,7 @@ bool ws_wh_bt_read(uint8_t *data, uint16_t length, struct ws_bt_ie *bt_ie)
333
333
{
334
334
mac_header_IE_t btt_ie_data ;
335
335
btt_ie_data .id = MAC_HEADER_ASSIGNED_EXTERNAL_ORG_IE_ID ;
336
- if (5 != mac_ie_header_sub_id_discover (data , length , & btt_ie_data , WH_IE_BT_TYPE )) {
336
+ if (5 > mac_ie_header_sub_id_discover (data , length , & btt_ie_data , WH_IE_BT_TYPE )) {
337
337
return false;
338
338
}
339
339
data = btt_ie_data .content_ptr ;
@@ -346,7 +346,7 @@ bool ws_wh_fc_read(uint8_t *data, uint16_t length, struct ws_fc_ie *fc_ie)
346
346
{
347
347
mac_header_IE_t fc_ie_data ;
348
348
fc_ie_data .id = MAC_HEADER_ASSIGNED_EXTERNAL_ORG_IE_ID ;
349
- if (2 != mac_ie_header_sub_id_discover (data , length , & fc_ie_data , WH_IE_FC_TYPE )) {
349
+ if (2 > mac_ie_header_sub_id_discover (data , length , & fc_ie_data , WH_IE_FC_TYPE )) {
350
350
return false;
351
351
}
352
352
data = fc_ie_data .content_ptr ;
@@ -359,7 +359,7 @@ bool ws_wh_rsl_read(uint8_t *data, uint16_t length, int8_t *rsl)
359
359
{
360
360
mac_header_IE_t rsl_ie_data ;
361
361
rsl_ie_data .id = MAC_HEADER_ASSIGNED_EXTERNAL_ORG_IE_ID ;
362
- if (1 != mac_ie_header_sub_id_discover (data , length , & rsl_ie_data , WH_IE_RSL_TYPE )) {
362
+ if (1 > mac_ie_header_sub_id_discover (data , length , & rsl_ie_data , WH_IE_RSL_TYPE )) {
363
363
return false;
364
364
}
365
365
* rsl = * rsl_ie_data .content_ptr ;
@@ -371,7 +371,7 @@ bool ws_wh_ea_read(uint8_t *data, uint16_t length, uint8_t *eui64)
371
371
{
372
372
mac_header_IE_t rsl_ie_data ;
373
373
rsl_ie_data .id = MAC_HEADER_ASSIGNED_EXTERNAL_ORG_IE_ID ;
374
- if (8 != mac_ie_header_sub_id_discover (data , length , & rsl_ie_data , WH_IE_EA_TYPE )) {
374
+ if (8 > mac_ie_header_sub_id_discover (data , length , & rsl_ie_data , WH_IE_EA_TYPE )) {
375
375
return false;
376
376
}
377
377
memcpy (eui64 , rsl_ie_data .content_ptr , 8 );
@@ -415,7 +415,7 @@ bool ws_wp_nested_us_read(uint8_t *data, uint16_t length, struct ws_us_ie *us_ie
415
415
mac_nested_payload_IE_t nested_payload_ie ;
416
416
nested_payload_ie .id = WP_PAYLOAD_IE_US_TYPE ;
417
417
nested_payload_ie .type_long = true;
418
- if (mac_ie_nested_discover (data , length , & nested_payload_ie ) < 4 ) {
418
+ if (4 > mac_ie_nested_discover (data , length , & nested_payload_ie )) {
419
419
return false;
420
420
}
421
421
@@ -517,7 +517,7 @@ bool ws_wp_nested_bs_read(uint8_t *data, uint16_t length, struct ws_bs_ie *bs_ie
517
517
mac_nested_payload_IE_t nested_payload_ie ;
518
518
nested_payload_ie .id = WP_PAYLOAD_IE_BS_TYPE ;
519
519
nested_payload_ie .type_long = true;
520
- if (mac_ie_nested_discover (data , length , & nested_payload_ie ) < 10 ) {
520
+ if (10 > mac_ie_nested_discover (data , length , & nested_payload_ie )) {
521
521
return false;
522
522
}
523
523
data = nested_payload_ie .content_ptr ;
@@ -590,7 +590,7 @@ bool ws_wp_nested_pan_read(uint8_t *data, uint16_t length, struct ws_pan_informa
590
590
mac_nested_payload_IE_t nested_payload_ie ;
591
591
nested_payload_ie .id = WP_PAYLOAD_IE_PAN_TYPE ;
592
592
nested_payload_ie .type_long = false;
593
- if (mac_ie_nested_discover (data , length , & nested_payload_ie ) != 5 ) {
593
+ if (5 > mac_ie_nested_discover (data , length , & nested_payload_ie )) {
594
594
return false;
595
595
}
596
596
@@ -608,7 +608,7 @@ bool ws_wp_nested_pan_version_read(uint8_t *data, uint16_t length, uint16_t *pan
608
608
mac_nested_payload_IE_t nested_payload_ie ;
609
609
nested_payload_ie .id = WP_PAYLOAD_IE_PAN_VER_TYPE ;
610
610
nested_payload_ie .type_long = false;
611
- if (mac_ie_nested_discover (data , length , & nested_payload_ie ) != 2 ) {
611
+ if (2 > mac_ie_nested_discover (data , length , & nested_payload_ie )) {
612
612
return false;
613
613
}
614
614
* pan_version = common_read_16_bit_inverse (nested_payload_ie .content_ptr );
0 commit comments