diff options
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 30 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 27 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/wext.h | 2 |
3 files changed, 29 insertions, 30 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index abd20ea92553..21d57690c20a 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -73,32 +73,6 @@ void lbs_mac_event_disconnected(struct lbs_private *priv) | |||
73 | lbs_deb_leave(LBS_DEB_ASSOC); | 73 | lbs_deb_leave(LBS_DEB_ASSOC); |
74 | } | 74 | } |
75 | 75 | ||
76 | /** | ||
77 | * @brief This function handles MIC failure event. | ||
78 | * | ||
79 | * @param priv A pointer to struct lbs_private structure | ||
80 | * @para event the event id | ||
81 | * @return n/a | ||
82 | */ | ||
83 | static void handle_mic_failureevent(struct lbs_private *priv, u32 event) | ||
84 | { | ||
85 | char buf[50]; | ||
86 | |||
87 | lbs_deb_enter(LBS_DEB_CMD); | ||
88 | memset(buf, 0, sizeof(buf)); | ||
89 | |||
90 | sprintf(buf, "%s", "MLME-MICHAELMICFAILURE.indication "); | ||
91 | |||
92 | if (event == MACREG_INT_CODE_MIC_ERR_UNICAST) { | ||
93 | strcat(buf, "unicast "); | ||
94 | } else { | ||
95 | strcat(buf, "multicast "); | ||
96 | } | ||
97 | |||
98 | lbs_send_iwevcustom_event(priv, buf); | ||
99 | lbs_deb_leave(LBS_DEB_CMD); | ||
100 | } | ||
101 | |||
102 | static int lbs_ret_reg_access(struct lbs_private *priv, | 76 | static int lbs_ret_reg_access(struct lbs_private *priv, |
103 | u16 type, struct cmd_ds_command *resp) | 77 | u16 type, struct cmd_ds_command *resp) |
104 | { | 78 | { |
@@ -477,12 +451,12 @@ int lbs_process_event(struct lbs_private *priv, u32 event) | |||
477 | 451 | ||
478 | case MACREG_INT_CODE_MIC_ERR_UNICAST: | 452 | case MACREG_INT_CODE_MIC_ERR_UNICAST: |
479 | lbs_deb_cmd("EVENT: UNICAST MIC ERROR\n"); | 453 | lbs_deb_cmd("EVENT: UNICAST MIC ERROR\n"); |
480 | handle_mic_failureevent(priv, MACREG_INT_CODE_MIC_ERR_UNICAST); | 454 | lbs_send_mic_failureevent(priv, event); |
481 | break; | 455 | break; |
482 | 456 | ||
483 | case MACREG_INT_CODE_MIC_ERR_MULTICAST: | 457 | case MACREG_INT_CODE_MIC_ERR_MULTICAST: |
484 | lbs_deb_cmd("EVENT: MULTICAST MIC ERROR\n"); | 458 | lbs_deb_cmd("EVENT: MULTICAST MIC ERROR\n"); |
485 | handle_mic_failureevent(priv, MACREG_INT_CODE_MIC_ERR_MULTICAST); | 459 | lbs_send_mic_failureevent(priv, event); |
486 | break; | 460 | break; |
487 | 461 | ||
488 | case MACREG_INT_CODE_MIB_CHANGED: | 462 | case MACREG_INT_CODE_MIB_CHANGED: |
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index dc63b33b01f0..a8eb9e1fcf36 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -54,7 +54,7 @@ void lbs_send_disconnect_notification(struct lbs_private *priv) | |||
54 | wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); | 54 | wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); |
55 | } | 55 | } |
56 | 56 | ||
57 | void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str) | 57 | static void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str) |
58 | { | 58 | { |
59 | union iwreq_data iwrq; | 59 | union iwreq_data iwrq; |
60 | u8 buf[50]; | 60 | u8 buf[50]; |
@@ -79,6 +79,31 @@ void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str) | |||
79 | } | 79 | } |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * @brief This function handles MIC failure event. | ||
83 | * | ||
84 | * @param priv A pointer to struct lbs_private structure | ||
85 | * @para event the event id | ||
86 | * @return n/a | ||
87 | */ | ||
88 | void lbs_send_mic_failureevent(struct lbs_private *priv, u32 event) | ||
89 | { | ||
90 | char buf[50]; | ||
91 | |||
92 | lbs_deb_enter(LBS_DEB_CMD); | ||
93 | memset(buf, 0, sizeof(buf)); | ||
94 | |||
95 | sprintf(buf, "%s", "MLME-MICHAELMICFAILURE.indication "); | ||
96 | |||
97 | if (event == MACREG_INT_CODE_MIC_ERR_UNICAST) | ||
98 | strcat(buf, "unicast "); | ||
99 | else | ||
100 | strcat(buf, "multicast "); | ||
101 | |||
102 | lbs_send_iwevcustom_event(priv, buf); | ||
103 | lbs_deb_leave(LBS_DEB_CMD); | ||
104 | } | ||
105 | |||
106 | /** | ||
82 | * @brief Find the channel frequency power info with specific channel | 107 | * @brief Find the channel frequency power info with specific channel |
83 | * | 108 | * |
84 | * @param priv A pointer to struct lbs_private structure | 109 | * @param priv A pointer to struct lbs_private structure |
diff --git a/drivers/net/wireless/libertas/wext.h b/drivers/net/wireless/libertas/wext.h index 50558262ecc3..5e041e64ecfe 100644 --- a/drivers/net/wireless/libertas/wext.h +++ b/drivers/net/wireless/libertas/wext.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #define _LBS_WEXT_H_ | 5 | #define _LBS_WEXT_H_ |
6 | 6 | ||
7 | void lbs_send_disconnect_notification(struct lbs_private *priv); | 7 | void lbs_send_disconnect_notification(struct lbs_private *priv); |
8 | void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str); | 8 | void lbs_send_mic_failureevent(struct lbs_private *priv, u32 event); |
9 | 9 | ||
10 | extern struct iw_handler_def lbs_handler_def; | 10 | extern struct iw_handler_def lbs_handler_def; |
11 | extern struct iw_handler_def mesh_handler_def; | 11 | extern struct iw_handler_def mesh_handler_def; |