Loading
qcacld-3.0: Check FTM mode in vendor cmds handlers
Vendor commands of wiphy aren't initialized when driver load as FTM mode, if changed to mission mode later with following cli: echo 0 > /sys/module/wlan/parameters/con_mode, vendor commands of wiphy keep uninitialized, wpa supplicant can't get roam offload status by QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_FEATURES, so PMK isn't sent to driver/firmware, roam offload failed. To fix it, remove QDF_GLOBAL_FTM_MODE check in wlan_hdd_cfg80211_init, let vendor commands of wiphy initialized in FTM mode too when driver load. But in each vendor cmd, check FTM mode when called, if FTM mode, return -EPERM. When driver is changed to mission mode, all interfaces are deleted and re-added by driver, when interface added event is received by wpa supplicant, QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_FEATURES is called again to get roam offload enabled status, PMK will be sent to driver and firmware when RSO start, roam offload will work. Change-Id: Ie0c868ebd4b7e356d72a154206b13df94f378188 CRs-Fixed: 3213221