iw: nl80211: add NLA_F_NESTED to nla_nest_start() with older libnl versions
It is noticed in Kernel version 5.14.0-rc4+, that when sending the NL cmd
NL80211_CMD_SET_TID_CONFIG with nested attrs under NL80211_ATTR_TID_CONFIG,
kernel returnes a response with the error "NLA_F_NESTED is missing".
$ sudo ./iw dev wlan0 set tidconf tids 0x1 ampdu on
kernel reports: NLA_F_NESTED is missing
command failed: Invalid argument (-22))
Fix this by setting NLA_F_NESTED flag everytime when using nla_nest_start()
library function. This is needed to make cfg80211 allow the nl80211 command
NL80211_ATTR_TID_CONFIG in the new kernel versions that enforce netlink
attribute policy validation.
Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com>
Link: https://lore.kernel.org/r/20210910141618.1594617-1-gokulkumar792@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>