qcacld-3.0: Remove redundant code in __wlan_hdd_cfg80211_connect()

qcacld-2.0 to qcacld-3.0 propagation

Make changes to invoke wlan_hdd_cfg80211_connect_start() one time instead
of two instances of invoking the same function using local variables.

Change-Id: I2aba87645296414f340c89b6bd2f556b05f05115
CRs-Fixed: 898565
This commit is contained in:
Sreelakshmi Konamki 2015-11-03 16:30:32 +05:30 • committed by Satish Singh
commit 6bd8a2e02b

View file

@ -8288,6 +8288,12 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
struct cfg80211_connect_params *req)
{
int status;
u16 channel;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
const u8 *bssid_hint = req->bssid_hint;
#else
const u8 *bssid_hint = NULL;
#endif
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(ndev);
hdd_context_t *pHddCtx;
@ -8359,31 +8365,13 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
return status;
}
if (req->channel) {
status = wlan_hdd_cfg80211_connect_start(pAdapter, req->ssid,
req->ssid_len,
req->bssid,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) || \
defined(CFG80211_BSSID_HINT_BACKPORT)
req->bssid_hint,
#else
NULL,
#endif
req->channel->
hw_value);
} else {
status = wlan_hdd_cfg80211_connect_start(pAdapter, req->ssid,
req->ssid_len,
req->bssid,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) || \
defined(CFG80211_BSSID_HINT_BACKPORT)
req->bssid_hint,
#else
NULL,
#endif
0);
}
if (req->channel)
channel = req->channel->hw_value;
else
channel = 0;
status = wlan_hdd_cfg80211_connect_start(pAdapter, req->ssid,
req->ssid_len, req->bssid,
bssid_hint, channel);
if (0 > status) {
hddLog(LOGE, FL("connect failed"));
return status;