qcacld-3.0: Remove legacy P2P codes in HDD

To reduce code size, remove legacy P2P codes in HDD layer.

Change-Id: Idaaacac4fdaf1b964432c33c10b1c86f8a591c2d
CRs-Fixed: 2099184
This commit is contained in:
Wu Gao
2017-10-13 18:34:02 +08:00
committed by snandini
parent c02785db21
commit 02bd75be9c
8 changed files with 63 additions and 2094 deletions

View File

@@ -579,37 +579,12 @@ struct hdd_beacon_data {
int dtim_period; int dtim_period;
}; };
enum rem_on_channel_request_type {
REMAIN_ON_CHANNEL_REQUEST,
OFF_CHANNEL_ACTION_TX,
};
struct action_pkt_buffer { struct action_pkt_buffer {
uint8_t *frame_ptr; uint8_t *frame_ptr;
uint32_t frame_length; uint32_t frame_length;
uint16_t freq; uint16_t freq;
}; };
struct hdd_remain_on_chan_ctx {
struct net_device *dev;
struct ieee80211_channel chan;
enum nl80211_channel_type chan_type;
unsigned int duration;
u64 cookie;
enum rem_on_channel_request_type rem_on_chan_request;
qdf_mc_timer_t hdd_remain_on_chan_timer;
struct action_pkt_buffer action_pkt_buff;
bool hdd_remain_on_chan_cancel_in_progress;
uint32_t scan_id;
};
/* RoC Request entry */
struct hdd_roc_req {
qdf_list_node_t node; /* MUST be first element */
struct hdd_adapter *adapter;
struct hdd_remain_on_chan_ctx *remain_chan_ctx;
};
/** /**
* struct hdd_scan_req - Scan Request entry * struct hdd_scan_req - Scan Request entry
* @node : List entry element * @node : List entry element
@@ -654,11 +629,6 @@ enum action_frm_type {
struct hdd_cfg80211_state { struct hdd_cfg80211_state {
uint16_t current_freq; uint16_t current_freq;
u64 action_cookie;
uint8_t *buf;
size_t len;
struct hdd_remain_on_chan_ctx *remain_on_chan_ctx;
struct mutex remain_on_chan_ctx_lock;
enum p2p_action_frame_state actionFrmState; enum p2p_action_frame_state actionFrmState;
/* is_go_neg_ack_received flag is set to 1 when /* is_go_neg_ack_received flag is set to 1 when
* the pending ack for GO negotiation req is * the pending ack for GO negotiation req is

View File

@@ -103,11 +103,7 @@ void __hdd_indicate_mgmt_frame(struct hdd_adapter *adapter,
uint32_t nFrameLength, uint8_t *pbFrames, uint32_t nFrameLength, uint8_t *pbFrames,
uint8_t frameType, uint32_t rxChan, int8_t rxRssi); uint8_t frameType, uint32_t rxChan, int8_t rxRssi);
void hdd_remain_chan_ready_handler(struct hdd_adapter *adapter,
uint32_t scan_id);
void hdd_send_action_cnf(struct hdd_adapter *adapter, bool actionSendSuccess);
int wlan_hdd_check_remain_on_channel(struct hdd_adapter *adapter); int wlan_hdd_check_remain_on_channel(struct hdd_adapter *adapter);
void hdd_send_action_cnf_cb(uint32_t session_id, bool status);
void wlan_hdd_cancel_existing_remain_on_channel(struct hdd_adapter *adapter); void wlan_hdd_cancel_existing_remain_on_channel(struct hdd_adapter *adapter);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
@@ -154,7 +150,7 @@ void wlan_hdd_roc_request_dequeue(struct work_struct *work);
/** /**
* wlan_hdd_set_power_save() - hdd set power save * wlan_hdd_set_power_save() - hdd set power save
* @adapter: adapter context * @adapter: adapter context
* @pnoa: pointer to noa parameters * @ps_config: pointer to power save configure
* *
* This function sets power save parameters. * This function sets power save parameters.
* *
@@ -162,7 +158,7 @@ void wlan_hdd_roc_request_dequeue(struct work_struct *work);
* others - failure * others - failure
*/ */
int wlan_hdd_set_power_save(struct hdd_adapter *adapter, int wlan_hdd_set_power_save(struct hdd_adapter *adapter,
tpP2pPsConfig pnoa); struct p2p_ps_config *ps_config);
/** /**
* wlan_hdd_listen_offload_start() - hdd set listen offload start * wlan_hdd_listen_offload_start() - hdd set listen offload start

View File

@@ -4600,9 +4600,6 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *roam_info, uint32_t roamId,
} }
break; break;
#endif #endif
case eCSR_ROAM_REMAIN_CHAN_READY:
hdd_remain_chan_ready_handler(adapter, roam_info->roc_scan_id);
break;
#ifdef WLAN_FEATURE_11W #ifdef WLAN_FEATURE_11W
case eCSR_ROAM_UNPROT_MGMT_FRAME_IND: case eCSR_ROAM_UNPROT_MGMT_FRAME_IND:
hdd_indicate_unprot_mgmt_frame(adapter, hdd_indicate_unprot_mgmt_frame(adapter,

View File

@@ -13091,14 +13091,6 @@ int wlan_hdd_cfg80211_register_frames(struct hdd_adapter *adapter)
goto ret_status; goto ret_status;
} }
/* Register for p2p ack indication */
status = sme_register_p2p_ack_ind_callback(hHal,
hdd_send_action_cnf_cb);
if (status != QDF_STATUS_SUCCESS) {
hdd_err("Failed to register p2p_ack_ind_callback");
goto ret_status;
}
/* Right now we are registering these frame when driver is getting /* Right now we are registering these frame when driver is getting
* initialized. Once we will move to 2.6.37 kernel, in which we have * initialized. Once we will move to 2.6.37 kernel, in which we have
* frame register ops, we will move this code as a part of that * frame register ops, we will move this code as a part of that

View File

@@ -2207,10 +2207,6 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
qdf_mem_free(pSapEvent->sapevt.sapAssocStaListEvent.pAssocStas); qdf_mem_free(pSapEvent->sapevt.sapAssocStaListEvent.pAssocStas);
pSapEvent->sapevt.sapAssocStaListEvent.pAssocStas = NULL; pSapEvent->sapevt.sapAssocStaListEvent.pAssocStas = NULL;
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
case eSAP_REMAIN_CHAN_READY:
hdd_remain_chan_ready_handler(adapter,
pSapEvent->sapevt.sap_roc_ind.scan_id);
return QDF_STATUS_SUCCESS;
case eSAP_UNKNOWN_STA_JOIN: case eSAP_UNKNOWN_STA_JOIN:
snprintf(unknownSTAEvent, IW_CUSTOM_MAX, snprintf(unknownSTAEvent, IW_CUSTOM_MAX,
"JOIN_UNKNOWN_STA-%02x:%02x:%02x:%02x:%02x:%02x", "JOIN_UNKNOWN_STA-%02x:%02x:%02x:%02x:%02x:%02x",

View File

@@ -3504,25 +3504,7 @@ error_register_wext:
void hdd_cleanup_actionframe(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter) void hdd_cleanup_actionframe(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter)
{ {
struct hdd_cfg80211_state *cfgState; hdd_debug("Cleanup action frame");
cfgState = WLAN_HDD_GET_CFG_STATE_PTR(adapter);
if (NULL != cfgState->buf) {
unsigned long rc;
rc = wait_for_completion_timeout(
&adapter->tx_action_cnf_event,
msecs_to_jiffies(ACTION_FRAME_TX_TIMEOUT));
if (!rc) {
hdd_err("HDD Wait for Action Confirmation Failed!!");
/*
* Inform tx status as FAILURE to upper layer and free
* cfgState->buf
*/
hdd_send_action_cnf(adapter, false);
}
}
} }
/** /**
@@ -4121,7 +4103,6 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, uint8_t sessio
INIT_WORK(&adapter->scan_block_work, wlan_hdd_cfg80211_scan_block_cb); INIT_WORK(&adapter->scan_block_work, wlan_hdd_cfg80211_scan_block_cb);
cfgState = WLAN_HDD_GET_CFG_STATE_PTR(adapter); cfgState = WLAN_HDD_GET_CFG_STATE_PTR(adapter);
mutex_init(&cfgState->remain_on_chan_ctx_lock);
if (QDF_STATUS_SUCCESS == status) { if (QDF_STATUS_SUCCESS == status) {
/* Add it to the hdd's session list. */ /* Add it to the hdd's session list. */
@@ -5895,74 +5876,6 @@ static void hdd_rx_wake_lock_create(struct hdd_context *hdd_ctx)
qdf_wake_lock_create(&hdd_ctx->rx_wake_lock, "qcom_rx_wakelock"); qdf_wake_lock_create(&hdd_ctx->rx_wake_lock, "qcom_rx_wakelock");
} }
/**
* hdd_roc_context_init() - Init ROC context
* @hdd_ctx: HDD context.
*
* Initialize ROC context.
*
* Return: 0 on success and errno on failure.
*/
static int hdd_roc_context_init(struct hdd_context *hdd_ctx)
{
qdf_spinlock_create(&hdd_ctx->hdd_roc_req_q_lock);
qdf_list_create(&hdd_ctx->hdd_roc_req_q, MAX_ROC_REQ_QUEUE_ENTRY);
INIT_DELAYED_WORK(&hdd_ctx->roc_req_work, wlan_hdd_roc_request_dequeue);
return 0;
}
/**
* hdd_destroy_roc_req_q() - Free allocations in ROC Req Queue
* @hdd_ctx: HDD context.
*
* Free memory allocations made in ROC Req Queue nodes.
*
* Return: None.
*/
static void hdd_destroy_roc_req_q(struct hdd_context *hdd_ctx)
{
struct hdd_roc_req *hdd_roc_req;
QDF_STATUS status;
qdf_spin_lock(&hdd_ctx->hdd_roc_req_q_lock);
while (!qdf_list_empty(&hdd_ctx->hdd_roc_req_q)) {
status = qdf_list_remove_front(&hdd_ctx->hdd_roc_req_q,
(qdf_list_node_t **) &hdd_roc_req);
if (QDF_STATUS_SUCCESS != status) {
qdf_spin_unlock(&hdd_ctx->hdd_roc_req_q_lock);
hdd_debug("unable to remove roc element from list");
QDF_ASSERT(0);
return;
}
if (hdd_roc_req->remain_chan_ctx)
qdf_mem_free(hdd_roc_req->remain_chan_ctx);
qdf_mem_free(hdd_roc_req);
}
qdf_spin_unlock(&hdd_ctx->hdd_roc_req_q_lock);
}
/**
* hdd_roc_context_destroy() - Destroy ROC context
* @hdd_ctx: HDD context.
*
* Destroy roc list and flush the pending roc work.
*
* Return: None.
*/
static void hdd_roc_context_destroy(struct hdd_context *hdd_ctx)
{
flush_delayed_work(&hdd_ctx->roc_req_work);
hdd_destroy_roc_req_q(hdd_ctx);
qdf_spinlock_destroy(&hdd_ctx->hdd_roc_req_q_lock);
}
/** /**
* hdd_context_deinit() - Deinitialize HDD context * hdd_context_deinit() - Deinitialize HDD context
* @hdd_ctx: HDD context. * @hdd_ctx: HDD context.
@@ -5977,8 +5890,6 @@ static int hdd_context_deinit(struct hdd_context *hdd_ctx)
{ {
wlan_hdd_cfg80211_deinit(hdd_ctx->wiphy); wlan_hdd_cfg80211_deinit(hdd_ctx->wiphy);
hdd_roc_context_destroy(hdd_ctx);
hdd_sap_context_destroy(hdd_ctx); hdd_sap_context_destroy(hdd_ctx);
hdd_rx_wake_lock_destroy(hdd_ctx); hdd_rx_wake_lock_destroy(hdd_ctx);
@@ -6149,9 +6060,6 @@ static void hdd_wlan_exit(struct hdd_context *hdd_ctx)
hdd_ipa_cleanup(hdd_ctx); hdd_ipa_cleanup(hdd_ctx);
/* Free up RoC request queue and flush workqueue */
cds_flush_work(&hdd_ctx->roc_req_work);
wlansap_global_deinit(); wlansap_global_deinit();
wlan_hdd_deinit_chan_info(hdd_ctx); wlan_hdd_deinit_chan_info(hdd_ctx);
/* /*
@@ -7806,10 +7714,6 @@ static int hdd_context_init(struct hdd_context *hdd_ctx)
if (ret) if (ret)
goto scan_destroy; goto scan_destroy;
ret = hdd_roc_context_init(hdd_ctx);
if (ret)
goto sap_destroy;
wlan_hdd_cfg80211_extscan_init(hdd_ctx); wlan_hdd_cfg80211_extscan_init(hdd_ctx);
hdd_init_offloaded_packets_ctx(hdd_ctx); hdd_init_offloaded_packets_ctx(hdd_ctx);
@@ -7817,13 +7721,10 @@ static int hdd_context_init(struct hdd_context *hdd_ctx)
ret = wlan_hdd_cfg80211_init(hdd_ctx->parent_dev, hdd_ctx->wiphy, ret = wlan_hdd_cfg80211_init(hdd_ctx->parent_dev, hdd_ctx->wiphy,
hdd_ctx->config); hdd_ctx->config);
if (ret) if (ret)
goto roc_destroy; goto sap_destroy;
return 0; return 0;
roc_destroy:
hdd_roc_context_destroy(hdd_ctx);
sap_destroy: sap_destroy:
hdd_sap_context_destroy(hdd_ctx); hdd_sap_context_destroy(hdd_ctx);

File diff suppressed because it is too large Load Diff

View File

@@ -9451,9 +9451,7 @@ static int __iw_setchar_getnone(struct net_device *dev,
} }
break; break;
case WE_SET_AP_WPS_IE: case WE_SET_AP_WPS_IE:
hdd_debug("Received WE_SET_AP_WPS_IE"); hdd_debug("Received WE_SET_AP_WPS_IE, won't process");
sme_update_p2p_ie(WLAN_HDD_GET_HAL_CTX(adapter), pBuffer,
s_priv_data.length);
break; break;
case WE_SET_CONFIG: case WE_SET_CONFIG:
vstatus = hdd_execute_global_config_command(hdd_ctx, pBuffer); vstatus = hdd_execute_global_config_command(hdd_ctx, pBuffer);