qcacld-3.0: Replace typedef tSap_Event
The Linux Coding Style enumerates a few special cases where typedefs are useful, but stresses "NEVER EVER use a typedef unless you can clearly match one of those rules." The tSap_Event typedef does not meet any of those criteria, so replace it (and the "tp" variant) with a reference to the underlying struct. Further note the Linux Coding Style frowns upon mixed-case names and so-called Hungarian notation, so in conjunction rename the underlying struct to be in compliance. Change-Id: I523f8642ef81b3e35b2bb7a2801f3b734b2f5865 CRs-Fixed: 2412716
This commit is contained in:
@@ -1174,7 +1174,7 @@ static void wlan_hdd_sap_pre_cac_success(void *data)
|
||||
* Return: QDF_STATUS_SUCCESS on success,
|
||||
* other value on failure
|
||||
*/
|
||||
static QDF_STATUS hdd_handle_acs_scan_event(tpSap_Event sap_event,
|
||||
static QDF_STATUS hdd_handle_acs_scan_event(struct sap_event *sap_event,
|
||||
struct hdd_adapter *adapter)
|
||||
{
|
||||
struct hdd_context *hdd_ctx;
|
||||
@@ -1221,7 +1221,7 @@ static QDF_STATUS hdd_handle_acs_scan_event(tpSap_Event sap_event,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#else
|
||||
static QDF_STATUS hdd_handle_acs_scan_event(tpSap_Event sap_event,
|
||||
static QDF_STATUS hdd_handle_acs_scan_event(struct sap_event *sap_event,
|
||||
struct hdd_adapter *adapter)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -1699,7 +1699,7 @@ static void hdd_hostapd_set_sap_key(struct hdd_adapter *adapter)
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event sap_event,
|
||||
QDF_STATUS hdd_hostapd_sap_event_cb(struct sap_event *sap_event,
|
||||
void *context)
|
||||
{
|
||||
struct hdd_adapter *adapter;
|
||||
@@ -6468,7 +6468,7 @@ int wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy,
|
||||
*/
|
||||
void hdd_sap_indicate_disconnect_for_sta(struct hdd_adapter *adapter)
|
||||
{
|
||||
tSap_Event sap_event;
|
||||
struct sap_event sap_event;
|
||||
int sta_id;
|
||||
struct sap_context *sap_ctx;
|
||||
|
||||
|
@@ -106,7 +106,7 @@ QDF_STATUS hdd_softap_sta_deauth(struct hdd_adapter *adapter,
|
||||
void hdd_softap_sta_disassoc(struct hdd_adapter *adapter,
|
||||
struct csr_del_sta_params *pDelStaParams);
|
||||
|
||||
QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event sap_event,
|
||||
QDF_STATUS hdd_hostapd_sap_event_cb(struct sap_event *sap_event,
|
||||
void *context);
|
||||
/**
|
||||
* hdd_init_ap_mode() - to init the AP adaptor
|
||||
|
@@ -377,7 +377,7 @@ struct sap_ch_change_ind {
|
||||
* structure in the union is defined in comment next to the structure
|
||||
*/
|
||||
|
||||
typedef struct sap_Event_s {
|
||||
struct sap_event {
|
||||
eSapHddEvent sapHddEventCode;
|
||||
union {
|
||||
/*SAP_START_BSS_EVENT */
|
||||
@@ -408,7 +408,7 @@ typedef struct sap_Event_s {
|
||||
struct sap_acs_scan_complete_event sap_acs_scan_comp;
|
||||
QDF_STATUS ch_change_rsp_status;
|
||||
} sapevt;
|
||||
} tSap_Event, *tpSap_Event;
|
||||
};
|
||||
|
||||
typedef struct sap_SSID {
|
||||
uint8_t length;
|
||||
@@ -749,7 +749,7 @@ bool sap_is_auto_channel_select(struct sap_context *sapcontext);
|
||||
|
||||
QDF_STATUS wlansap_global_init(void);
|
||||
QDF_STATUS wlansap_global_deinit(void);
|
||||
typedef QDF_STATUS (*tpWLAN_SAPEventCB)(tpSap_Event pSapEvent,
|
||||
typedef QDF_STATUS (*tpWLAN_SAPEventCB)(struct sap_event *pSapEvent,
|
||||
void *pUsrContext);
|
||||
|
||||
/**
|
||||
|
@@ -1318,7 +1318,7 @@ static QDF_STATUS sap_goto_init(struct sap_context *sap_ctx)
|
||||
/**
|
||||
* sap_handle_acs_scan_event() - handle acs scan event for SAP
|
||||
* @sap_context: ptSapContext
|
||||
* @sap_event: tSap_Event
|
||||
* @sap_event: struct sap_event
|
||||
* @status: status of acs scan
|
||||
*
|
||||
* The function is to handle the eSAP_ACS_SCAN_SUCCESS_EVENT event.
|
||||
@@ -1326,7 +1326,7 @@ static QDF_STATUS sap_goto_init(struct sap_context *sap_ctx)
|
||||
* Return: void
|
||||
*/
|
||||
static void sap_handle_acs_scan_event(struct sap_context *sap_context,
|
||||
tSap_Event *sap_event, eSapStatus status)
|
||||
struct sap_event *sap_event, eSapStatus status)
|
||||
{
|
||||
sap_event->sapHddEventCode = eSAP_ACS_SCAN_SUCCESS_EVENT;
|
||||
sap_event->sapevt.sap_acs_scan_comp.status = status;
|
||||
@@ -1337,7 +1337,7 @@ static void sap_handle_acs_scan_event(struct sap_context *sap_context,
|
||||
}
|
||||
#else
|
||||
static void sap_handle_acs_scan_event(struct sap_context *sap_context,
|
||||
tSap_Event *sap_event, eSapStatus status)
|
||||
struct sap_event *sap_event, eSapStatus status)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@@ -1453,7 +1453,7 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx,
|
||||
void *context)
|
||||
{
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
tSap_Event sap_ap_event = {0};
|
||||
struct sap_event sap_ap_event = {0};
|
||||
struct mac_context *mac_ctx;
|
||||
struct oem_channel_info *chaninfo;
|
||||
tSap_StationAssocIndication *assoc_ind;
|
||||
|
Fai riferimento in un nuovo problema
Block a user