net80211: fix build for 526370fb85

In 526370fb85 "net80211: proper ssid
length check in setmlme_assoc_adhoc()" we are checking the
sizeof on an array function parameter which leads to a warning that
it will resturn the size of the type of the array rather than the
array size itself.  Use the defined length used both in the ioctl
and the sizing of the array function parameter instead.

Reported by:	CI
MFC after:	3 days
X-MFC with:	526370fb85
This commit is contained in:
Bjoern A. Zeeb 2021-10-08 11:21:44 +00:00
parent 76f3b8cb64
commit 0525ece355

View File

@ -1591,7 +1591,7 @@ setmlme_assoc_adhoc(struct ieee80211vap *vap,
("expected opmode IBSS or AHDEMO not %s",
ieee80211_opmode_name[vap->iv_opmode]));
if (ssid_len == 0 || ssid_len > sizeof(ssid))
if (ssid_len == 0 || ssid_len > IEEE80211_NWID_LEN)
return EINVAL;
sr = IEEE80211_MALLOC(sizeof(*sr), M_TEMP,