net80211: Fix mismatches in array bounds.

Reported by:	GCC -Warray-parameter
Reviewed by:	imp, emaste (earlier version)
Differential Revision:	https://reviews.freebsd.org/D37546
This commit is contained in:
John Baldwin 2022-12-07 12:31:53 -08:00
parent fb4a86164d
commit 1f07812095
3 changed files with 6 additions and 5 deletions

View File

@ -436,7 +436,7 @@ struct ieee80211_node *_ieee80211_find_rxnode_withkey(
const struct ieee80211_frame_min *, uint16_t keyix, const struct ieee80211_frame_min *, uint16_t keyix,
const char *func, int line); const char *func, int line);
struct ieee80211_node *_ieee80211_find_txnode(struct ieee80211vap *, struct ieee80211_node *_ieee80211_find_txnode(struct ieee80211vap *,
const uint8_t *, const uint8_t macaddr[IEEE80211_ADDR_LEN],
const char *func, int line); const char *func, int line);
#define ieee80211_free_node(ni) \ #define ieee80211_free_node(ni) \
_ieee80211_free_node(ni, __func__, __LINE__) _ieee80211_free_node(ni, __func__, __LINE__)

View File

@ -459,8 +459,8 @@ void ieee80211_notify_cac(struct ieee80211com *,
enum ieee80211_notify_cac_event); enum ieee80211_notify_cac_event);
void ieee80211_notify_node_deauth(struct ieee80211_node *); void ieee80211_notify_node_deauth(struct ieee80211_node *);
void ieee80211_notify_node_auth(struct ieee80211_node *); void ieee80211_notify_node_auth(struct ieee80211_node *);
void ieee80211_notify_country(struct ieee80211vap *, const uint8_t [], void ieee80211_notify_country(struct ieee80211vap *,
const uint8_t cc[2]); const uint8_t [IEEE80211_ADDR_LEN], const uint8_t cc[2]);
void ieee80211_notify_radio(struct ieee80211com *, int); void ieee80211_notify_radio(struct ieee80211com *, int);
void ieee80211_notify_ifnet_change(struct ieee80211vap *); void ieee80211_notify_ifnet_change(struct ieee80211vap *);
#endif /* _NET80211_IEEE80211_PROTO_H_ */ #endif /* _NET80211_IEEE80211_PROTO_H_ */

View File

@ -607,7 +607,8 @@ ieee80211_scan_timeout(struct ieee80211com *ic)
* Mark a scan cache entry after a successful associate. * Mark a scan cache entry after a successful associate.
*/ */
void void
ieee80211_scan_assoc_success(struct ieee80211vap *vap, const uint8_t mac[]) ieee80211_scan_assoc_success(struct ieee80211vap *vap,
const uint8_t mac[IEEE80211_ADDR_LEN])
{ {
struct ieee80211_scan_state *ss = vap->iv_ic->ic_scan; struct ieee80211_scan_state *ss = vap->iv_ic->ic_scan;
@ -623,7 +624,7 @@ ieee80211_scan_assoc_success(struct ieee80211vap *vap, const uint8_t mac[])
*/ */
void void
ieee80211_scan_assoc_fail(struct ieee80211vap *vap, ieee80211_scan_assoc_fail(struct ieee80211vap *vap,
const uint8_t mac[], int reason) const uint8_t mac[IEEE80211_ADDR_LEN], int reason)
{ {
struct ieee80211_scan_state *ss = vap->iv_ic->ic_scan; struct ieee80211_scan_state *ss = vap->iv_ic->ic_scan;