qcacld-3.0: Add a check to validate BW for set ap cahn width

Currently driver does not validate BW before it invokes the kernel
api cfg80211_get_chandef_type. There is a WARN_ON in kernel
if above api is invoked with invalid BW.

To address above issue add a logic to validate the BW
before driver invokes the kernel api.

Change-Id: Ie237aa46813bfa4206a1057a0418d9562dbbae75
CRs-Fixed: 2846462
This commit is contained in:
Ashish Kumar Dhanotiya 2021-01-12 19:31:13 +05:30 • committed by snandini
commit fb42513a12

View file

@ -23245,6 +23245,10 @@ __wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy,
return -EINVAL;
}
if (chandef->width > NL80211_CHAN_WIDTH_40) {
hdd_err_rl("invalid chan width %d", chandef->width);
return -EINVAL;
}
if (wlan_hdd_validate_vdev_id(adapter->vdev_id))
return -EINVAL;