software/drivers/sd8887/src/wlan/mapp/mlanevent/mlanevent.c
/**
 *  @brief Parse and print STA deauthentication event data
 *
 *  @param buffer   Pointer to received event buffer
 *  @param size     Length of the received event data
 *  @return         N/A
 */
@brief Parse and print STA deauthentication event data
@param buffer   Pointer to received event buffer
@param size     Length of the received event data
@return         N/A
@brief Parse and print STA deauthentication event data @param buffer Pointer to received event buffer @param size Length of the received event data @return N / A
void
print_event_sta_deauth(t_u8 *buffer, t_u16 size)
{
	eventbuf_sta_deauth *event_body = NULL;
	if (size < sizeof(eventbuf_sta_deauth)) {
		printf("ERR:Event buffer too small!\n");
		return;
	}
	event_body = (eventbuf_sta_deauth *)buffer;
	event_body->reason_code = uap_le16_to_cpu(event_body->reason_code);
	printf("EVENT: STA_DEAUTH\n");
	printf("Deauthenticated STA MAC: ");
	print_mac(event_body->sta_mac_address);
	printf("\nReason: ");
	switch (event_body->reason_code) {
	case 1:
		printf("Client station leaving the network\n");
		break;
	case 2:
		printf("Client station aged out\n");
		break;
	case 3:
		printf("Client station deauthenticated by user's request\n");
		break;
	case 4:
		printf("Client station authentication failure\n");
		break;
	case 5:
		printf("Client station association failure\n");
		break;
	case 6:
		printf("Client mac address is blocked by ACL filter\n");
		break;
	case 7:
		printf("Client station table is full\n");
		break;
	case 8:
		printf("Client 4-way handshake timeout\n");
		break;
	case 9:
		printf("Client group key handshake timeout\n");
		break;
	default:
		printf("Unspecified\n");
		break;
	}
	return;
}
void print_event_sta_deauth ( t_u8 * buffer , t_u16 size ) { eventbuf_sta_deauth * event_body = NULL ; if ( size < sizeof ( eventbuf_sta_deauth ) ) { printf ( " \n " ) ; return ; } event_body = ( eventbuf_sta_deauth * ) buffer ; event_body -> reason_code = uap_le16_to_cpu ( event_body -> reason_code ) ; printf ( " \n " ) ; printf ( " " ) ; print_mac ( event_body -> sta_mac_address ) ; printf ( " \n " ) ; switch ( event_body -> reason_code ) { case 1 : printf ( " \n " ) ; break ; case 2 : printf ( " \n " ) ; break ; case 3 : printf ( " \n " ) ; break ; case 4 : printf ( " \n " ) ; break ; case 5 : printf ( " \n " ) ; break ; case 6 : printf ( " \n " ) ; break ; case 7 : printf ( " \n " ) ; break ; case 8 : printf ( " \n " ) ; break ; case 9 : printf ( " \n " ) ; break ; default : printf ( " \n " ) ; break ; } return ; }
@brief Parse and print STA deauthentication event data
  @param buffer   Pointer to received event buffer
  @param size     Length of the received event data
  @return         N/A
@brief Parse and print STA deauthentication event data @param buffer Pointer to received event buffer @param size Length of the received event data @return N / A