HomeFreeBSD

net80211: fix possible panic for some drivers after r342211

Description

net80211: fix possible panic for some drivers after r342211

Check if rate control structures were allocated before trying to
access them in various places; this was possible before on
allocation failure (unlikely), but was revealed after r342211
where allocation was deferred.

In case if driver uses wlan_amrr(4) and it is loaded it
is possible to reproduce the panic via

sysctl net.wlan.<number>.rate_stats

(for wlan0 the number will be 0).

Tested with: RTL8188EE, AP mode + RTL8188CUS, STA mode.

MFC after: 3 days

Details

Provenance
avosAuthored on
Parents
rS342965: Fix indentation in ruptime command output for hosts in the "down" state.
Branches
Unknown
Tags
Unknown