@@ -404,7 +404,7 @@ static struct i40iw_puda_buf *i40iw_form_cm_frame(struct i40iw_cm_node *cm_node,
404
404
if (pdata )
405
405
pd_len = pdata -> size ;
406
406
407
- if (cm_node -> vlan_id < VLAN_TAG_PRESENT )
407
+ if (cm_node -> vlan_id <= VLAN_VID_MASK )
408
408
eth_hlen += 4 ;
409
409
410
410
if (cm_node -> ipv4 )
@@ -433,7 +433,7 @@ static struct i40iw_puda_buf *i40iw_form_cm_frame(struct i40iw_cm_node *cm_node,
433
433
434
434
ether_addr_copy (ethh -> h_dest , cm_node -> rem_mac );
435
435
ether_addr_copy (ethh -> h_source , cm_node -> loc_mac );
436
- if (cm_node -> vlan_id < VLAN_TAG_PRESENT ) {
436
+ if (cm_node -> vlan_id <= VLAN_VID_MASK ) {
437
437
((struct vlan_ethhdr * )ethh )-> h_vlan_proto = htons (ETH_P_8021Q );
438
438
vtag = (cm_node -> user_pri << VLAN_PRIO_SHIFT ) | cm_node -> vlan_id ;
439
439
((struct vlan_ethhdr * )ethh )-> h_vlan_TCI = htons (vtag );
@@ -463,7 +463,7 @@ static struct i40iw_puda_buf *i40iw_form_cm_frame(struct i40iw_cm_node *cm_node,
463
463
464
464
ether_addr_copy (ethh -> h_dest , cm_node -> rem_mac );
465
465
ether_addr_copy (ethh -> h_source , cm_node -> loc_mac );
466
- if (cm_node -> vlan_id < VLAN_TAG_PRESENT ) {
466
+ if (cm_node -> vlan_id <= VLAN_VID_MASK ) {
467
467
((struct vlan_ethhdr * )ethh )-> h_vlan_proto = htons (ETH_P_8021Q );
468
468
vtag = (cm_node -> user_pri << VLAN_PRIO_SHIFT ) | cm_node -> vlan_id ;
469
469
((struct vlan_ethhdr * )ethh )-> h_vlan_TCI = htons (vtag );
@@ -3323,7 +3323,7 @@ static void i40iw_init_tcp_ctx(struct i40iw_cm_node *cm_node,
3323
3323
3324
3324
tcp_info -> flow_label = 0 ;
3325
3325
tcp_info -> snd_mss = cpu_to_le32 (((u32 )cm_node -> tcp_cntxt .mss ));
3326
- if (cm_node -> vlan_id < VLAN_TAG_PRESENT ) {
3326
+ if (cm_node -> vlan_id <= VLAN_VID_MASK ) {
3327
3327
tcp_info -> insert_vlan_tag = true;
3328
3328
tcp_info -> vlan_tag = cpu_to_le16 (((u16 )cm_node -> user_pri << I40IW_VLAN_PRIO_SHIFT ) |
3329
3329
cm_node -> vlan_id );
0 commit comments