Skip to content

Commit 1ef212a

Browse files
osctobedavem330
authored andcommitted
i40iw: remove use of VLAN_TAG_PRESENT
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0d404a6 commit 1ef212a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/infiniband/hw/i40iw/i40iw_cm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ static struct i40iw_puda_buf *i40iw_form_cm_frame(struct i40iw_cm_node *cm_node,
404404
if (pdata)
405405
pd_len = pdata->size;
406406

407-
if (cm_node->vlan_id < VLAN_TAG_PRESENT)
407+
if (cm_node->vlan_id <= VLAN_VID_MASK)
408408
eth_hlen += 4;
409409

410410
if (cm_node->ipv4)
@@ -433,7 +433,7 @@ static struct i40iw_puda_buf *i40iw_form_cm_frame(struct i40iw_cm_node *cm_node,
433433

434434
ether_addr_copy(ethh->h_dest, cm_node->rem_mac);
435435
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) {
437437
((struct vlan_ethhdr *)ethh)->h_vlan_proto = htons(ETH_P_8021Q);
438438
vtag = (cm_node->user_pri << VLAN_PRIO_SHIFT) | cm_node->vlan_id;
439439
((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,
463463

464464
ether_addr_copy(ethh->h_dest, cm_node->rem_mac);
465465
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) {
467467
((struct vlan_ethhdr *)ethh)->h_vlan_proto = htons(ETH_P_8021Q);
468468
vtag = (cm_node->user_pri << VLAN_PRIO_SHIFT) | cm_node->vlan_id;
469469
((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,
33233323

33243324
tcp_info->flow_label = 0;
33253325
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) {
33273327
tcp_info->insert_vlan_tag = true;
33283328
tcp_info->vlan_tag = cpu_to_le16(((u16)cm_node->user_pri << I40IW_VLAN_PRIO_SHIFT) |
33293329
cm_node->vlan_id);

0 commit comments

Comments
 (0)