Make TWT wake interval 64 bit

As the TWT Wake Interval Mantissa is a 2-byte field and TWT Wake
Interval Exponent is a 5-bit field, Maximum TWT Wake Interval = 65,535 x
[2^31] microseconds. So make TWT wake inteval 64 bit to avoid overflow.

Bug: 296108122
Test: m
Change-Id: Ib4736a98f50abd1b8d63e3c5fa32b2c540bbcb0f
This commit is contained in:
maheshkkv 2023-12-14 16:35:41 -08:00
parent ba4e0aa3bd
commit b83596e8e6

View file

@ -31,8 +31,8 @@ typedef struct {
u8 is_flexible_twt_supported; // 0 for not supporting flexible twt schedules
u32 min_wake_duration_micros; // minimum twt wake duration capable in microseconds
u32 max_wake_duration_micros; // maximum twt wake duration capable in microseconds
u32 min_wake_interval_micros; // minimum twt wake interval capable in microseconds
u32 max_wake_interval_micros; // maximum twt wake interval capable in microseconds
u64 min_wake_interval_micros; // minimum twt wake interval capable in microseconds
u64 max_wake_interval_micros; // maximum twt wake interval capable in microseconds
} wifi_twt_capabilities;
/* TWT request parameters to setup or update a TWT session */
@ -41,8 +41,8 @@ typedef struct {
// Otherwise UNSPECIFIED.
u32 min_wake_duration_micros; // minimum twt wake duration in microseconds
u32 max_wake_duration_micros; // maximum twt wake duration in microseconds
u32 min_wake_interval_micros; // minimum twt wake interval in microseconds
u32 max_wake_interval_micros; // maximum twt wake interval in microseconds
u64 min_wake_interval_micros; // minimum twt wake interval in microseconds
u64 max_wake_interval_micros; // maximum twt wake interval in microseconds
} wifi_twt_request;
/* TWT negotiation types */
@ -56,7 +56,7 @@ typedef struct {
u32 session_id; // a unique identifier for the session
s8 mlo_link_id; // link id in case of MLO connection. Otherwise UNSPECIFIED.
u32 wake_duration_micros; // TWT service period in microseconds
u32 wake_interval_micros; // TWT wake interval for this session in microseconds
u64 wake_interval_micros; // TWT wake interval for this session in microseconds
wifi_twt_negotiation_type negotiation_type; // TWT negotiation type
u8 is_trigger_enabled; // 0 if this TWT session is not trigger enabled
u8 is_announced; // 0 if this TWT session is not announced