ath6kl: remove SEND_EVENT_TO_APP define
This was enabled by default but its pretty useless for upstream given that its sendign some custom wireless event. These need to be reviewed instead and a respective cfg80211 event / call should be used later. Cc: Naveen Singh <nsingh@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
eba67f4366
commit
871f7105cc
|
@ -110,8 +110,6 @@ ifeq ($(CONFIG_ATH6KL_SKIP_ABI_VERSION_CHECK),y)
|
|||
ccflags-y += -DATH6KL_SKIP_ABI_VERSION_CHECK
|
||||
endif
|
||||
|
||||
ccflags-y += -DTCMD
|
||||
ccflags-y += -DSEND_EVENT_TO_APP
|
||||
ccflags-y += -DUSER_KEYS
|
||||
ccflags-y += -DNO_SYNC_FLUSH
|
||||
ccflags-y += -DHTC_EP_STAT_PROFILING
|
||||
|
|
|
@ -130,19 +130,9 @@ extern "C" {
|
|||
#define A_WMI_PEER_EVENT(devt, eventCode, bssid) \
|
||||
ar6000_peer_event ((devt), (eventCode), (bssid))
|
||||
|
||||
#ifdef SEND_EVENT_TO_APP
|
||||
|
||||
#define A_WMI_SEND_EVENT_TO_APP(ar, eventId, datap, len) \
|
||||
ar6000_send_event_to_app((ar), (eventId), (datap), (len))
|
||||
|
||||
#define A_WMI_SEND_GENERIC_EVENT_TO_APP(ar, eventId, datap, len) \
|
||||
ar6000_send_generic_event_to_app((ar), (eventId), (datap), (len))
|
||||
|
||||
#else
|
||||
|
||||
#define A_WMI_SEND_EVENT_TO_APP(ar, eventId, datap, len)
|
||||
#define A_WMI_SEND_GENERIC_EVENT_TO_APP(ar, eventId, datap, len)
|
||||
|
||||
#ifdef CONFIG_HOST_TCMD_SUPPORT
|
||||
#define A_WMI_TCMD_RX_REPORT_EVENT(devt, results, len) \
|
||||
ar6000_tcmd_rx_report_event((devt), (results), (len))
|
||||
#endif
|
||||
|
||||
#define A_WMI_HBCHALLENGERESP_EVENT(devt, cookie, source) \
|
||||
|
|
|
@ -591,7 +591,6 @@ ar6000_dbglog_event(struct ar6_softc *ar, u32 dropped,
|
|||
send = dbglog_get_debug_fragment(&buffer[sent], length - sent,
|
||||
MAX_WIRELESS_EVENT_SIZE);
|
||||
while (send) {
|
||||
ar6000_send_event_to_app(ar, WMIX_DBGLOG_EVENTID, (u8 *)&buffer[sent], send);
|
||||
sent += send;
|
||||
send = dbglog_get_debug_fragment(&buffer[sent], length - sent,
|
||||
MAX_WIRELESS_EVENT_SIZE);
|
||||
|
@ -1830,9 +1829,6 @@ static void ar6000_target_failure(void *Instance, int Status)
|
|||
sip = true;
|
||||
errEvent.errorVal = WMI_TARGET_COM_ERR |
|
||||
WMI_TARGET_FATAL_ERR;
|
||||
ar6000_send_event_to_app(ar, WMI_ERROR_REPORT_EVENTID,
|
||||
(u8 *)&errEvent,
|
||||
sizeof(WMI_TARGET_ERROR_REPORT_EVENT));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2122,9 +2118,6 @@ static void ar6000_detect_error(unsigned long ptr)
|
|||
ar->arHBChallengeResp.seqNum = 0;
|
||||
errEvent.errorVal = WMI_TARGET_COM_ERR | WMI_TARGET_FATAL_ERR;
|
||||
AR6000_SPIN_UNLOCK(&ar->arLock, 0);
|
||||
ar6000_send_event_to_app(ar, WMI_ERROR_REPORT_EVENTID,
|
||||
(u8 *)&errEvent,
|
||||
sizeof(WMI_TARGET_ERROR_REPORT_EVENT));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4922,19 +4915,13 @@ ar6000_rssiThreshold_event(struct ar6_softc *ar, WMI_RSSI_THRESHOLD_VAL newThre
|
|||
userRssiThold.rssi = rssi;
|
||||
A_PRINTF("rssi Threshold range = %d tag = %d rssi = %d\n", newThreshold,
|
||||
userRssiThold.tag, userRssiThold.rssi);
|
||||
|
||||
ar6000_send_event_to_app(ar, WMI_RSSI_THRESHOLD_EVENTID,(u8 *)&userRssiThold, sizeof(USER_RSSI_THOLD));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ar6000_hbChallengeResp_event(struct ar6_softc *ar, u32 cookie, u32 source)
|
||||
{
|
||||
if (source == APP_HB_CHALLENGE) {
|
||||
/* Report it to the app in case it wants a positive acknowledgement */
|
||||
ar6000_send_event_to_app(ar, WMIX_HB_CHALLENGE_RESP_EVENTID,
|
||||
(u8 *)&cookie, sizeof(cookie));
|
||||
} else {
|
||||
if (source != APP_HB_CHALLENGE) {
|
||||
/* This would ignore the replys that come in after their due time */
|
||||
if (cookie == ar->arHBChallengeResp.seqNum) {
|
||||
ar->arHBChallengeResp.outstanding = false;
|
||||
|
@ -5387,100 +5374,6 @@ ar6000_alloc_cookie(struct ar6_softc *ar)
|
|||
return cookie;
|
||||
}
|
||||
|
||||
#ifdef SEND_EVENT_TO_APP
|
||||
/*
|
||||
* This function is used to send event which come from taget to
|
||||
* the application. The buf which send to application is include
|
||||
* the event ID and event content.
|
||||
*/
|
||||
#define EVENT_ID_LEN 2
|
||||
void ar6000_send_event_to_app(struct ar6_softc *ar, u16 eventId,
|
||||
u8 *datap, int len)
|
||||
{
|
||||
|
||||
#if (WIRELESS_EXT >= 15)
|
||||
|
||||
/* note: IWEVCUSTOM only exists in wireless extensions after version 15 */
|
||||
|
||||
char *buf;
|
||||
u16 size;
|
||||
union iwreq_data wrqu;
|
||||
|
||||
size = len + EVENT_ID_LEN;
|
||||
|
||||
if (size > IW_CUSTOM_MAX) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("WMI event ID : 0x%4.4X, len = %d too big for IWEVCUSTOM (max=%d) \n",
|
||||
eventId, size, IW_CUSTOM_MAX));
|
||||
return;
|
||||
}
|
||||
|
||||
buf = A_MALLOC_NOWAIT(size);
|
||||
if (NULL == buf){
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("%s: failed to allocate %d bytes\n", __func__, size));
|
||||
return;
|
||||
}
|
||||
|
||||
A_MEMZERO(buf, size);
|
||||
memcpy(buf, &eventId, EVENT_ID_LEN);
|
||||
memcpy(buf+EVENT_ID_LEN, datap, len);
|
||||
|
||||
//AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("event ID = %d,len = %d\n",*(u16 *)buf, size));
|
||||
A_MEMZERO(&wrqu, sizeof(wrqu));
|
||||
wrqu.data.length = size;
|
||||
wireless_send_event(ar->arNetDev, IWEVCUSTOM, &wrqu, buf);
|
||||
kfree(buf);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is used to send events larger than 256 bytes
|
||||
* to the application. The buf which is sent to application
|
||||
* includes the event ID and event content.
|
||||
*/
|
||||
void ar6000_send_generic_event_to_app(struct ar6_softc *ar, u16 eventId,
|
||||
u8 *datap, int len)
|
||||
{
|
||||
|
||||
#if (WIRELESS_EXT >= 18)
|
||||
|
||||
/* IWEVGENIE exists in wireless extensions version 18 onwards */
|
||||
|
||||
char *buf;
|
||||
u16 size;
|
||||
union iwreq_data wrqu;
|
||||
|
||||
size = len + EVENT_ID_LEN;
|
||||
|
||||
if (size > IW_GENERIC_IE_MAX) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("WMI event ID : 0x%4.4X, len = %d too big for IWEVGENIE (max=%d) \n",
|
||||
eventId, size, IW_GENERIC_IE_MAX));
|
||||
return;
|
||||
}
|
||||
|
||||
buf = A_MALLOC_NOWAIT(size);
|
||||
if (NULL == buf){
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("%s: failed to allocate %d bytes\n", __func__, size));
|
||||
return;
|
||||
}
|
||||
|
||||
A_MEMZERO(buf, size);
|
||||
memcpy(buf, &eventId, EVENT_ID_LEN);
|
||||
memcpy(buf+EVENT_ID_LEN, datap, len);
|
||||
|
||||
A_MEMZERO(&wrqu, sizeof(wrqu));
|
||||
wrqu.data.length = size;
|
||||
wireless_send_event(ar->arNetDev, IWEVGENIE, &wrqu, buf);
|
||||
|
||||
kfree(buf);
|
||||
|
||||
#endif /* (WIRELESS_EXT >= 18) */
|
||||
|
||||
}
|
||||
#endif /* SEND_EVENT_TO_APP */
|
||||
|
||||
|
||||
void
|
||||
ar6000_tx_retry_err_event(void *devt)
|
||||
{
|
||||
|
@ -5491,13 +5384,9 @@ void
|
|||
ar6000_snrThresholdEvent_rx(void *devt, WMI_SNR_THRESHOLD_VAL newThreshold, u8 snr)
|
||||
{
|
||||
WMI_SNR_THRESHOLD_EVENT event;
|
||||
struct ar6_softc *ar = (struct ar6_softc *)devt;
|
||||
|
||||
event.range = newThreshold;
|
||||
event.snr = snr;
|
||||
|
||||
ar6000_send_event_to_app(ar, WMI_SNR_THRESHOLD_EVENTID, (u8 *)&event,
|
||||
sizeof(WMI_SNR_THRESHOLD_EVENT));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -624,8 +624,6 @@ ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool
|
|||
}
|
||||
if (pSleepEvent) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("SENT WLAN Sleep Event %d\n", wmiSleepEvent.sleepState));
|
||||
ar6000_send_event_to_app(ar, WMI_REPORT_SLEEP_STATE_EVENTID, (u8 *)pSleepEvent,
|
||||
sizeof(WMI_REPORT_SLEEP_STATE_EVENTID));
|
||||
}
|
||||
}
|
||||
up(&ar->arSem);
|
||||
|
|
|
@ -83,11 +83,6 @@ s16 rssi_compensation_reverse_calc(struct ar6_softc *ar, s16 rssi, bool Above);
|
|||
|
||||
void ar6000_dbglog_init_done(struct ar6_softc *ar);
|
||||
|
||||
#ifdef SEND_EVENT_TO_APP
|
||||
void ar6000_send_event_to_app(struct ar6_softc *ar, u16 eventId, u8 *datap, int len);
|
||||
void ar6000_send_generic_event_to_app(struct ar6_softc *ar, u16 eventId, u8 *datap, int len);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HOST_TCMD_SUPPORT
|
||||
void ar6000_tcmd_rx_report_event(void *devt, u8 *results, int len);
|
||||
#endif
|
||||
|
|
|
@ -944,23 +944,19 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf)
|
|||
case (WMI_READY_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_READY_EVENTID\n", DBGARG));
|
||||
status = wmi_ready_event_rx(wmip, datap, len);
|
||||
A_WMI_SEND_EVENT_TO_APP(wmip->wmi_devt, id, datap, len);
|
||||
A_WMI_DBGLOG_INIT_DONE(wmip->wmi_devt);
|
||||
break;
|
||||
case (WMI_CONNECT_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_CONNECT_EVENTID\n", DBGARG));
|
||||
status = wmi_connect_event_rx(wmip, datap, len);
|
||||
A_WMI_SEND_GENERIC_EVENT_TO_APP(wmip->wmi_devt, id, datap, len);
|
||||
break;
|
||||
case (WMI_DISCONNECT_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_DISCONNECT_EVENTID\n", DBGARG));
|
||||
status = wmi_disconnect_event_rx(wmip, datap, len);
|
||||
A_WMI_SEND_EVENT_TO_APP(wmip->wmi_devt, id, datap, len);
|
||||
break;
|
||||
case (WMI_PEER_NODE_EVENTID):
|
||||
A_DPRINTF (DBG_WMI, (DBGFMT "WMI_PEER_NODE_EVENTID\n", DBGARG));
|
||||
status = wmi_peer_node_event_rx(wmip, datap, len);
|
||||
A_WMI_SEND_EVENT_TO_APP(wmip->wmi_devt, id, datap, len);
|
||||
break;
|
||||
case (WMI_TKIP_MICERR_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_TKIP_MICERR_EVENTID\n", DBGARG));
|
||||
|
@ -991,7 +987,6 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf)
|
|||
memcpy(bih->bssid, bih2.bssid, ATH_MAC_LEN);
|
||||
|
||||
status = wmi_bssInfo_event_rx(wmip, datap, len);
|
||||
A_WMI_SEND_GENERIC_EVENT_TO_APP(wmip->wmi_devt, id, datap, len);
|
||||
}
|
||||
break;
|
||||
case (WMI_REGDOMAIN_EVENTID):
|
||||
|
@ -1001,13 +996,6 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf)
|
|||
case (WMI_PSTREAM_TIMEOUT_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_PSTREAM_TIMEOUT_EVENTID\n", DBGARG));
|
||||
status = wmi_pstream_timeout_event_rx(wmip, datap, len);
|
||||
/* pstreams are fatpipe abstractions that get implicitly created.
|
||||
* User apps only deal with thinstreams. creation of a thinstream
|
||||
* by the user or data traffic flow in an AC triggers implicit
|
||||
* pstream creation. Do we need to send this event to App..?
|
||||
* no harm in sending it.
|
||||
*/
|
||||
A_WMI_SEND_EVENT_TO_APP(wmip->wmi_devt, id, datap, len);
|
||||
break;
|
||||
case (WMI_NEIGHBOR_REPORT_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_NEIGHBOR_REPORT_EVENTID\n", DBGARG));
|
||||
|
@ -1016,7 +1004,6 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf)
|
|||
case (WMI_SCAN_COMPLETE_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_SCAN_COMPLETE_EVENTID\n", DBGARG));
|
||||
status = wmi_scanComplete_rx(wmip, datap, len);
|
||||
A_WMI_SEND_EVENT_TO_APP(wmip->wmi_devt, id, datap, len);
|
||||
break;
|
||||
case (WMI_CMDERROR_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_CMDERROR_EVENTID\n", DBGARG));
|
||||
|
@ -1033,7 +1020,6 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf)
|
|||
case (WMI_ERROR_REPORT_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_ERROR_REPORT_EVENTID\n", DBGARG));
|
||||
status = wmi_reportErrorEvent_rx(wmip, datap, len);
|
||||
A_WMI_SEND_EVENT_TO_APP(wmip->wmi_devt, id, datap, len);
|
||||
break;
|
||||
case (WMI_OPT_RX_FRAME_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_OPT_RX_FRAME_EVENTID\n", DBGARG));
|
||||
|
@ -1072,7 +1058,6 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf)
|
|||
case (WMI_TX_RETRY_ERR_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_TX_RETRY_ERR_EVENTID\n", DBGARG));
|
||||
status = wmi_txRetryErrEvent_rx(wmip, datap, len);
|
||||
A_WMI_SEND_EVENT_TO_APP(wmip->wmi_devt, id, datap, len);
|
||||
break;
|
||||
case (WMI_SNR_THRESHOLD_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_SNR_THRESHOLD_EVENTID\n", DBGARG));
|
||||
|
@ -1081,7 +1066,6 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf)
|
|||
case (WMI_LQ_THRESHOLD_EVENTID):
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "WMI_LQ_THRESHOLD_EVENTID\n", DBGARG));
|
||||
status = wmi_lqThresholdEvent_rx(wmip, datap, len);
|
||||
A_WMI_SEND_EVENT_TO_APP(wmip->wmi_devt, id, datap, len);
|
||||
break;
|
||||
case (WMI_APLIST_EVENTID):
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_WMI, ("Received APLIST Event\n"));
|
||||
|
|
Loading…
Reference in New Issue