From fc55b957c8f41defc94126f8fcee955c6bbbfb44 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Wed, 29 Apr 2020 19:02:08 +0530 Subject: [PATCH] qcacld-3.0: Pass frequency as an argument to set mon chan api With recent 6GHz changes set mon chan api has changed to accept the frequency as an argument instead of the channel number. Currently existing iwpriv interface is still passing channel number as an argument to this api which results in the failure of this command. To resolve this above issue, convert the channel number received as an argument to frequency at the entry point of the iwpriv command and invoke set mon chan api with the fequency as an argument. Change-Id: I6bb0682ff3cf5c6e8086012522ea1455a1cecae4 CRs-Fixed: 2675499 --- core/hdd/src/wlan_hdd_wext.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index f7f6bbaa797e..2a891f277fe0 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -9618,7 +9618,15 @@ static int __iw_set_two_ints_getnone(struct net_device *dev, hdd_set_dump_dp_trace(value[1], value[2]); break; case WE_SET_MON_MODE_CHAN: - ret = wlan_hdd_set_mon_chan(adapter, value[1], value[2]); + if (value[1] > 256) + ret = wlan_hdd_set_mon_chan(adapter, value[1], + value[2]); + else + ret = wlan_hdd_set_mon_chan( + adapter, + wlan_reg_legacy_chan_to_freq( + hdd_ctx->pdev, value[1]), + value[2]); break; case WE_SET_WLAN_SUSPEND: ret = hdd_wlan_fake_apps_suspend(hdd_ctx->wiphy, dev,