diff options
| author | Yun Park <yunp@qca.qualcomm.com> | 2014-08-30 15:56:24 -0700 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-09-02 10:59:43 -0700 |
| commit | 3d4df6fd95d034ef65f0128e2a2438263cd0ddcd (patch) | |
| tree | 654ee26ae34378f48c961dbe2f1e9c177a736c66 /CORE | |
| parent | 176fb240520d688e7638dcf057ac8f8a3a9b4355 (diff) | |
qcacld: StopBss when no available channel after radar detection
When no channel is available from random channel selection after radar
detection, call StopBss or make StartBss failed. This change includes
sending WLAN_SVC_DFS_ALL_CHANNEL_UNAVAIL_IND Netlink event.
Change-Id: Ib1384f0634db3c8f2ff80716b88386ff4894bd52
CRs-Fixed: 717713
(cherry picked from commit a6f590809bf4d890bf9d6b8f8855f5714ad633ad)
Diffstat (limited to 'CORE')
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_hostapd.c | 5 | ||||
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 1 | ||||
| -rw-r--r-- | CORE/SAP/inc/sapApi.h | 1 | ||||
| -rw-r--r-- | CORE/SAP/src/sapApiLinkCntl.c | 13 | ||||
| -rw-r--r-- | CORE/SAP/src/sapFsm.c | 17 | ||||
| -rw-r--r-- | CORE/SVC/external/wlan_nlink_common.h | 1 |
6 files changed, 32 insertions, 6 deletions
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c index b551a7df565b..c9bd4ee7fa6d 100644 --- a/CORE/HDD/src/wlan_hdd_hostapd.c +++ b/CORE/HDD/src/wlan_hdd_hostapd.c @@ -1045,6 +1045,11 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa #endif break; + case eSAP_DFS_NO_AVAILABLE_CHANNEL: + wlan_hdd_send_svc_nlink_msg(WLAN_SVC_DFS_ALL_CHANNEL_UNAVAIL_IND, + &dfs_info, sizeof(struct wlan_dfs_info)); + break; + case eSAP_STA_SET_KEY_EVENT: //TODO: forward the message to hostapd once implementtation is done for now just print hddLog(LOG1, FL("SET Key: configured status = %s"),pSapEvent->sapevt.sapStationSetKeyCompleteEvent.status ? diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 2f2c7158378a..0190f3db0e35 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -13573,6 +13573,7 @@ void wlan_hdd_send_svc_nlink_msg(int type, void *data, int len) case WLAN_SVC_DFS_CAC_START_IND: case WLAN_SVC_DFS_CAC_END_IND: case WLAN_SVC_DFS_RADAR_DETECT_IND: + case WLAN_SVC_DFS_ALL_CHANNEL_UNAVAIL_IND: ani_hdr->length = len; nlh->nlmsg_len = NLMSG_LENGTH((sizeof(tAniMsgHdr) + len)); nl_data = (char *)ani_hdr + sizeof(tAniMsgHdr); diff --git a/CORE/SAP/inc/sapApi.h b/CORE/SAP/inc/sapApi.h index 601cec77567f..86c6ae0b637b 100644 --- a/CORE/SAP/inc/sapApi.h +++ b/CORE/SAP/inc/sapApi.h @@ -206,6 +206,7 @@ typedef enum { eSAP_DFS_RADAR_DETECT, eSAP_DFS_NOL_GET, /* Event sent when user need to get the DFS NOL from CNSS */ eSAP_DFS_NOL_SET, /* Event sent when user need to set the DFS NOL to CNSS */ + eSAP_DFS_NO_AVAILABLE_CHANNEL, /* No ch available after DFS RADAR detect */ } eSapHddEvent; typedef enum { diff --git a/CORE/SAP/src/sapApiLinkCntl.c b/CORE/SAP/src/sapApiLinkCntl.c index 3695bc3eae50..adbcaff458a2 100644 --- a/CORE/SAP/src/sapApiLinkCntl.c +++ b/CORE/SAP/src/sapApiLinkCntl.c @@ -432,6 +432,11 @@ WLANSAP_RoamCallback VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, FL("Received Radar Indication")); + VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_MED, + "sapdfs: Indicate eSAP_DFS_RADAR_DETECT to HDD"); + sapSignalHDDevent(sapContext, NULL, eSAP_DFS_RADAR_DETECT, + (v_PVOID_t) eSAP_STATUS_SUCCESS); + /* sync to latest DFS-NOL */ sapSignalHDDevent(sapContext, NULL, eSAP_DFS_NOL_GET, (v_PVOID_t) eSAP_STATUS_SUCCESS); @@ -447,6 +452,14 @@ WLANSAP_RoamCallback pMac->sap.SapDfsInfo.user_provided_target_channel = 0; } + if (pMac->sap.SapDfsInfo.target_channel == 0) { + /* No available channel found */ + VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR, + FL("No available channel found, StopBss!!!")); + WLANSAP_StopBss((v_PVOID_t)sapContext); + break; + } + pMac->sap.SapDfsInfo.cac_state = eSAP_DFS_DO_NOT_SKIP_CAC; sap_CacResetNotify(hHal); diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c index dab13f174f15..39cad7f1fc7a 100644 --- a/CORE/SAP/src/sapFsm.c +++ b/CORE/SAP/src/sapFsm.c @@ -932,7 +932,9 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext) "%s[%d]: Target channel Index = %d target_channel = %d", __func__,__LINE__, i, target_channel); } else { - target_channel = sapContext->channel; + sapSignalHDDevent(sapContext, NULL, eSAP_DFS_NO_AVAILABLE_CHANNEL, + (v_PVOID_t) eSAP_STATUS_SUCCESS); + target_channel = 0; } return target_channel; @@ -1780,6 +1782,7 @@ sapSignalHDDevent case eSAP_DFS_CAC_START: case eSAP_DFS_CAC_END: case eSAP_DFS_RADAR_DETECT: + case eSAP_DFS_NO_AVAILABLE_CHANNEL: VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, "In %s, SAP event callback event = %s : %d", __func__, "eSAP_DFS event", sapHddevent); @@ -2502,6 +2505,13 @@ sapFsm /* find a new available channel */ ch = sapRandomChannelSel(sapContext); + if (ch == 0) { + /* No available channel found */ + VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR, + FL("No available channel found!!!")); + return VOS_STATUS_E_FAULT; + } + VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, FL("channel %d is in NOL, StartBss on new channel %d"), sapContext->channel, ch); @@ -2796,11 +2806,6 @@ sapFsm /* Radar is seen on the current operating channel * send CSA IE for all associated stations */ - VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_MED, - "sapdfs: Indicate eSAP_DFS_RADAR_DETECT to HDD"); - - sapSignalHDDevent(sapContext, NULL, eSAP_DFS_RADAR_DETECT, - (v_PVOID_t) eSAP_STATUS_SUCCESS); if (pMac != NULL) { /* Request for CSA IE transmission */ diff --git a/CORE/SVC/external/wlan_nlink_common.h b/CORE/SVC/external/wlan_nlink_common.h index d3d38ecf6df9..b604adb29a85 100644 --- a/CORE/SVC/external/wlan_nlink_common.h +++ b/CORE/SVC/external/wlan_nlink_common.h @@ -92,6 +92,7 @@ #define WLAN_SVC_DFS_RADAR_DETECT_IND 0x105 #define WLAN_SVC_WLAN_STATUS_IND 0x106 #define WLAN_SVC_WLAN_VERSION_IND 0x107 +#define WLAN_SVC_DFS_ALL_CHANNEL_UNAVAIL_IND 0x108 #define WLAN_SVC_MAX_SSID_LEN 32 #define WLAN_SVC_MAX_BSSID_LEN 6 |
