Merge "qcacld-3.0: Validate wdev before accessing netdev" into wlan-cld3.driver.lnx.2.0
This commit is contained in:
commit
531e1b7402
@ -2020,7 +2020,7 @@ static int __wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
|
||||
{
|
||||
struct hdd_context *hdd_ctx = (struct hdd_context *) wiphy_priv(wiphy);
|
||||
mac_handle_t mac_handle;
|
||||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(wdev->netdev);
|
||||
struct hdd_adapter *adapter;
|
||||
struct qdf_mac_addr bssid = QDF_MAC_ADDR_BCAST_INIT;
|
||||
struct qdf_mac_addr selfmac;
|
||||
QDF_STATUS status;
|
||||
@ -2029,6 +2029,13 @@ static int __wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
|
||||
|
||||
hdd_enter();
|
||||
|
||||
if (!wdev) {
|
||||
hdd_err("wdev is null, set tx power failed");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
adapter = WLAN_HDD_GET_PRIV_PTR(wdev->netdev);
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user