On Wed, Aug 31, 2016 at 09:39:47PM +0200, Imre Vadasz wrote: > Hi, > The policy field in struct iwm_time_event_cmd_v2 is just a 16bit integer, > so we should use htole16() when setting it, instead of htole32().
Makes sense to me, although I don't have hardware to test this. > > Index: sys/dev/pci/if_iwm.c > =================================================================== > RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v > retrieving revision 1.99 > diff -u -r1.99 if_iwm.c > --- sys/dev/pci/if_iwm.c 17 Aug 2016 09:39:38 -0000 1.99 > +++ sys/dev/pci/if_iwm.c 31 Aug 2016 19:37:05 -0000 > @@ -2379,7 +2379,7 @@ > time_cmd.duration = htole32(duration); > time_cmd.repeat = 1; > time_cmd.policy > - = htole32(IWM_TE_V2_NOTIF_HOST_EVENT_START | > + = htole16(IWM_TE_V2_NOTIF_HOST_EVENT_START | > IWM_TE_V2_NOTIF_HOST_EVENT_END | > IWM_T2_V2_START_IMMEDIATELY); > >
