wifi: cfg80211: change mesh_setup::ie_len to size_t
PATCH v2 1/1 wifi: cfg80211: change mesh_setup::ie_len to size_t
The ie_len field in struct mesh_setup stores the length of the information elements (IEs) buffer. It is currently defined as u8, which limits the maximum supported length to 255 bytes.
The IE length is derived from memory buffers whose size is naturally represented by size_t. Using u8 may truncate larger values and can result in incorrect length handling.
Change ie_len to size_t so it can represent the full buffer length and match the type commonly used for memory sizes throughout the kernel.
Signed-off-by Ramakrishnan Rathinasamy <[email protected]>
Signed-off-by Srinivas Achary <[email protected]>
---
Changes in v2:
- Add the "wifi: cfg80211:" subsystem prefix.
- Replace the non-standard Co-authored-by trailer with Signed-off-by.
include/net/cfg80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/cfg80211.h +1 -1
@@ -2803,7 +2803,7 @@ struct mesh_setup {u8 path_metric;u8 auth_id;const u8 *ie; -u8 ie_len; +size_t ie_len;bool is_authenticated;bool is_secure;bool user_mpm;
Signature · 1 line
2.34.1