Skip to content
Commit 0a6f2f05 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jeff Kirsher
Browse files

igb: Fix a test with HWTSTAMP_TX_ON

'HWTSTAMP_TX_ON' should be handled as a value, not as a bit mask.
The modified code should behave the same, because HWTSTAMP_TX_ON is 1
and no other possible values of 'tx_type' would match the test.
However, this is more future-proof, should other values be allowed one day.

See 'struct hwtstamp_config' in 'include/uapi/linux/net_tstamp.h'

This fixes a warning reported by smatch:
   igb_xmit_frame_ring() warn: bit shifter 'HWTSTAMP_TX_ON' used for logical '&'

Fixes: 26bd4e2d

 ("igb: protect TX timestamping from API misuse")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 17a0b9ad
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment