summaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorandrea merello <andrea.merello@gmail.com>2014-01-19 22:21:49 +0100
committerJohannes Berg <johannes.berg@intel.com>2014-02-04 21:48:13 +0100
commit52512072738c851896c8bfa31938eba1e9b9bc62 (patch)
treef72b395870a7c268e960178ef58177fea0a26bdb /net/wireless/reg.c
parent30ef7ef9672d92ab2cac37f60a31955c118321e7 (diff)
downloadop-kernel-dev-52512072738c851896c8bfa31938eba1e9b9bc62.zip
op-kernel-dev-52512072738c851896c8bfa31938eba1e9b9bc62.tar.gz
mac80211: add check on hw->max_signal value on ieee80211_register_hw
When IEEE80211_HW_SIGNAL_UNSPEC is set, mac80211 will perform a division by max_signal in ieee80211_bss_info_update. If max_signal is not properly set by the driver (for example it is zero) this leads to a divide error and crash. Thanks to Larry Finger, who pointed me to this. This patch adds in ieee80211_register_hw one more check to detect this condition and eventually returns -EINVAL, as already done for other checks already performed there. Signed-off-by: andrea merello <andrea.merello@gmail.com> [move to an already existing SIGNAL_UNSPEC check] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/reg.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud