diff options
| author | Service qcabuildsw <qcabuildsw@localhost> | 2016-08-25 12:20:55 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-25 12:20:55 -0700 |
| commit | 119db31ba776856ff36c6383aef260997310e64c (patch) | |
| tree | 0965217d148d618320cbf2d6d51887ed93903a04 | |
| parent | e0676b5d59514be521d37e620a06a8e3ae760224 (diff) | |
| parent | b2f6c26fa481321058ac716597c8d0c3d8069988 (diff) | |
Merge "qcacld-3.0: Fixes for p2p from GUI/standalone" into wlan-cld3.driver.lnx.1.1-dev
| -rw-r--r-- | core/hdd/inc/wlan_hdd_main.h | 4 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 16 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 10 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_p2p.c | 3 |
4 files changed, 26 insertions, 7 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 40242313f10e..ab0ea8af9f10 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -260,6 +260,10 @@ #define BSS_WAIT_TIMEOUT 10000 #define PRE_CAC_SSID "pre_cac_ssid" + +/* session ID invalid */ +#define HDD_SESSION_ID_INVALID 0xFF + /* * Generic asynchronous request/response support * diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index b0c9328e7445..821e88cd3910 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -8345,7 +8345,7 @@ static int wlan_hdd_change_client_iface_to_new_mode(struct net_device *ndev, struct hdd_config *config = hdd_ctx->config; hdd_wext_state_t *wext; struct wireless_dev *wdev; - QDF_STATUS status; + QDF_STATUS status = QDF_STATUS_SUCCESS; ENTER(); @@ -8372,12 +8372,12 @@ static int wlan_hdd_change_client_iface_to_new_mode(struct net_device *ndev, } memset(&adapter->sessionCtx, 0, sizeof(adapter->sessionCtx)); hdd_set_station_ops(adapter->dev); - status = hdd_init_station_mode(adapter); wext = WLAN_HDD_GET_WEXT_STATE_PTR(adapter); wext->roamProfile.pAddIEScan = adapter->scan_info.scanAddIE.addIEdata; wext->roamProfile.nAddIEScanLength = adapter->scan_info.scanAddIE.length; if (type == NL80211_IFTYPE_ADHOC) { + status = hdd_init_station_mode(adapter); wext->roamProfile.BSSType = eCSR_BSS_TYPE_START_IBSS; wext->roamProfile.phyMode = hdd_cfg_xlate_to_csr_phy_mode(config->dot11Mode); @@ -8497,7 +8497,11 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy, type); if (vstatus != QDF_STATUS_SUCCESS) return -EINVAL; - + if (hdd_start_adapter(pAdapter)) { + hdd_err("Failed to start adapter :%d", + pAdapter->device_mode); + return -EINVAL; + } goto done; case NL80211_IFTYPE_AP: case NL80211_IFTYPE_P2P_GO: @@ -8575,7 +8579,11 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy, type); if (status != QDF_STATUS_SUCCESS) return status; - + if (hdd_start_adapter(pAdapter)) { + hdd_err("Failed to start adapter :%d", + pAdapter->device_mode); + return -EINVAL; + } goto done; case NL80211_IFTYPE_AP: diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 1d65118396ed..19f1099c3bce 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1618,6 +1618,12 @@ int hdd_start_adapter(hdd_adapter_t *adapter) if (ret) goto err_start_adapter; break; + case QDF_IBSS_MODE: + /* + * For IBSS interface is initialized as part of + * hdd_init_station_mode() + */ + return 0; case QDF_FTM_MODE: ret = hdd_start_ftm_adapter(adapter); if (ret) @@ -1801,7 +1807,6 @@ static int __hdd_open(struct net_device *dev) int ret; ENTER_DEV(dev); - MTRACE(qdf_trace(QDF_MODULE_ID_HDD, TRACE_CODE_HDD_OPEN_REQUEST, adapter->sessionId, adapter->device_mode)); @@ -3181,6 +3186,8 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type, if (QDF_STATUS_SUCCESS != hdd_debugfs_init(adapter)) hdd_err("Interface %s wow debug_fs init failed", iface_name); + adapter->sessionId = HDD_SESSION_ID_INVALID; + return adapter; err_lro_cleanup: @@ -6281,7 +6288,6 @@ static hdd_adapter_t *hdd_open_interfaces(hdd_context_t *hdd_ctx, if (adapter == NULL) return ERR_PTR(-ENOSPC); - ret = hdd_open_p2p_interface(hdd_ctx, rtnl_held); if (ret) goto err_close_adapter; diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index c5255ad23d48..02ff295d9cc5 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -2481,7 +2481,8 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter, } } /* Indicate Frame Over Normal Interface */ - hddLog(LOG1, FL("Indicate Frame over NL80211 Interface")); + hddLog(LOG1, FL("Indicate Frame over NL80211 sessionid : %d, idx :%d"), + pAdapter->sessionId, pAdapter->dev->ifindex); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)) cfg80211_rx_mgmt(pAdapter->dev->ieee80211_ptr, freq, 0, pbFrames, |
