OSDN Git Service

brcmsmac: Initialize power in brcms_c_stf_ss_algo_channel_get()
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 18 Jul 2016 23:24:37 +0000 (16:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Oct 2016 13:23:46 +0000 (15:23 +0200)
commit32a57f4ed2f654685f200dc6ab0aed67364af570
treeed4e4accd84358522be8395b742b096961937f2d
parent3d0ef898fbbea4406e8a0b15201348bc30a2cadd
brcmsmac: Initialize power in brcms_c_stf_ss_algo_channel_get()

commit f823a2aa8f4674c095a5413b9e3ba12d82df06f2 upstream.

wlc_phy_txpower_get_current() does a logical OR of power->flags, which
presumes that power.flags was initiliazed earlier by the caller,
unfortunately, this is not the case, so make sure we zero out the struct
tx_power before calling into wlc_phy_txpower_get_current().

Reported-by: coverity (CID 146011)
Fixes: 5b435de0d7868 ("net: wireless: add brcm80211 drivers")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/brcm80211/brcmsmac/stf.c