mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacld-3.0: Use cfg80211_get_chandef_type till NL80211_CHAN_WIDTH_40
cfg80211_get_chandef_type supports till NL80211_CHAN_WIDTH_40. Any chan width more than NL80211_CHAN_WIDTH_40 can be treated as NL80211_CHAN_HT40PLUS. __wlan_hdd_cfg80211_start_ap has the same logic in-place. Change-Id: I70166faf16730128039e4e48d9e90aefb1674977 CRs-Fixed: 2717615
This commit is contained in:
parent
c96cc11d3b
commit
2d42406171
1 changed files with 7 additions and 4 deletions
|
|
@ -23239,6 +23239,7 @@ __wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy,
|
|||
struct hdd_context *hdd_ctx;
|
||||
QDF_STATUS status;
|
||||
int retval = 0;
|
||||
enum nl80211_channel_type channel_type;
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
|
|
@ -23261,12 +23262,14 @@ __wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy,
|
|||
if (status)
|
||||
return status;
|
||||
|
||||
hdd_debug("Channel width changed to %d ",
|
||||
cfg80211_get_chandef_type(chandef));
|
||||
if (chandef->width < NL80211_CHAN_WIDTH_80)
|
||||
channel_type = cfg80211_get_chandef_type(chandef);
|
||||
else
|
||||
channel_type = NL80211_CHAN_HT40PLUS;
|
||||
hdd_debug("Channel width changed to %d ", channel_type);
|
||||
|
||||
/* Change SAP ht2040 mode */
|
||||
status = hdd_set_sap_ht2040_mode(adapter,
|
||||
cfg80211_get_chandef_type(chandef));
|
||||
status = hdd_set_sap_ht2040_mode(adapter, channel_type);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
hdd_err("Cannot set SAP HT20/40 mode!");
|
||||
retval = -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue