mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-10-04 07:33:17 +00:00
libertas: move mic failure event to wext.c
... because for cfg80211 we'll need a completely different implementation. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
fea2b8ec81
commit
560c63383f
@ -73,32 +73,6 @@ void lbs_mac_event_disconnected(struct lbs_private *priv)
|
|||||||
lbs_deb_leave(LBS_DEB_ASSOC);
|
lbs_deb_leave(LBS_DEB_ASSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This function handles MIC failure event.
|
|
||||||
*
|
|
||||||
* @param priv A pointer to struct lbs_private structure
|
|
||||||
* @para event the event id
|
|
||||||
* @return n/a
|
|
||||||
*/
|
|
||||||
static void handle_mic_failureevent(struct lbs_private *priv, u32 event)
|
|
||||||
{
|
|
||||||
char buf[50];
|
|
||||||
|
|
||||||
lbs_deb_enter(LBS_DEB_CMD);
|
|
||||||
memset(buf, 0, sizeof(buf));
|
|
||||||
|
|
||||||
sprintf(buf, "%s", "MLME-MICHAELMICFAILURE.indication ");
|
|
||||||
|
|
||||||
if (event == MACREG_INT_CODE_MIC_ERR_UNICAST) {
|
|
||||||
strcat(buf, "unicast ");
|
|
||||||
} else {
|
|
||||||
strcat(buf, "multicast ");
|
|
||||||
}
|
|
||||||
|
|
||||||
lbs_send_iwevcustom_event(priv, buf);
|
|
||||||
lbs_deb_leave(LBS_DEB_CMD);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int lbs_ret_reg_access(struct lbs_private *priv,
|
static int lbs_ret_reg_access(struct lbs_private *priv,
|
||||||
u16 type, struct cmd_ds_command *resp)
|
u16 type, struct cmd_ds_command *resp)
|
||||||
{
|
{
|
||||||
@ -477,12 +451,12 @@ int lbs_process_event(struct lbs_private *priv, u32 event)
|
|||||||
|
|
||||||
case MACREG_INT_CODE_MIC_ERR_UNICAST:
|
case MACREG_INT_CODE_MIC_ERR_UNICAST:
|
||||||
lbs_deb_cmd("EVENT: UNICAST MIC ERROR\n");
|
lbs_deb_cmd("EVENT: UNICAST MIC ERROR\n");
|
||||||
handle_mic_failureevent(priv, MACREG_INT_CODE_MIC_ERR_UNICAST);
|
lbs_send_mic_failureevent(priv, event);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MACREG_INT_CODE_MIC_ERR_MULTICAST:
|
case MACREG_INT_CODE_MIC_ERR_MULTICAST:
|
||||||
lbs_deb_cmd("EVENT: MULTICAST MIC ERROR\n");
|
lbs_deb_cmd("EVENT: MULTICAST MIC ERROR\n");
|
||||||
handle_mic_failureevent(priv, MACREG_INT_CODE_MIC_ERR_MULTICAST);
|
lbs_send_mic_failureevent(priv, event);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MACREG_INT_CODE_MIB_CHANGED:
|
case MACREG_INT_CODE_MIB_CHANGED:
|
||||||
|
@ -54,7 +54,7 @@ void lbs_send_disconnect_notification(struct lbs_private *priv)
|
|||||||
wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
|
wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str)
|
static void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str)
|
||||||
{
|
{
|
||||||
union iwreq_data iwrq;
|
union iwreq_data iwrq;
|
||||||
u8 buf[50];
|
u8 buf[50];
|
||||||
@ -78,6 +78,31 @@ void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str)
|
|||||||
lbs_deb_leave(LBS_DEB_WEXT);
|
lbs_deb_leave(LBS_DEB_WEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles MIC failure event.
|
||||||
|
*
|
||||||
|
* @param priv A pointer to struct lbs_private structure
|
||||||
|
* @para event the event id
|
||||||
|
* @return n/a
|
||||||
|
*/
|
||||||
|
void lbs_send_mic_failureevent(struct lbs_private *priv, u32 event)
|
||||||
|
{
|
||||||
|
char buf[50];
|
||||||
|
|
||||||
|
lbs_deb_enter(LBS_DEB_CMD);
|
||||||
|
memset(buf, 0, sizeof(buf));
|
||||||
|
|
||||||
|
sprintf(buf, "%s", "MLME-MICHAELMICFAILURE.indication ");
|
||||||
|
|
||||||
|
if (event == MACREG_INT_CODE_MIC_ERR_UNICAST)
|
||||||
|
strcat(buf, "unicast ");
|
||||||
|
else
|
||||||
|
strcat(buf, "multicast ");
|
||||||
|
|
||||||
|
lbs_send_iwevcustom_event(priv, buf);
|
||||||
|
lbs_deb_leave(LBS_DEB_CMD);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Find the channel frequency power info with specific channel
|
* @brief Find the channel frequency power info with specific channel
|
||||||
*
|
*
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#define _LBS_WEXT_H_
|
#define _LBS_WEXT_H_
|
||||||
|
|
||||||
void lbs_send_disconnect_notification(struct lbs_private *priv);
|
void lbs_send_disconnect_notification(struct lbs_private *priv);
|
||||||
void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str);
|
void lbs_send_mic_failureevent(struct lbs_private *priv, u32 event);
|
||||||
|
|
||||||
extern struct iw_handler_def lbs_handler_def;
|
extern struct iw_handler_def lbs_handler_def;
|
||||||
extern struct iw_handler_def mesh_handler_def;
|
extern struct iw_handler_def mesh_handler_def;
|
||||||
|
Loading…
Reference in New Issue
Block a user