From patchwork Thu Oct 22 13:30:57 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Schurig X-Patchwork-Id: 55345 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9MDZjfY017508 for ; Thu, 22 Oct 2009 13:35:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755915AbZJVNfj (ORCPT ); Thu, 22 Oct 2009 09:35:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756062AbZJVNfj (ORCPT ); Thu, 22 Oct 2009 09:35:39 -0400 Received: from mx51.mymxserver.com ([85.199.173.110]:2996 "EHLO mx51.mymxserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755638AbZJVNfi (ORCPT ); Thu, 22 Oct 2009 09:35:38 -0400 Received: from localhost (localhost [127.0.0.1]) by localhost.mx51.mymxserver.com (Postfix) with ESMTP id 647DF148016; Thu, 22 Oct 2009 15:35:42 +0200 (CEST) X-Virus-Scanned: by Mittwald Mailscanner Received: from mx51.mymxserver.com ([127.0.0.1]) by localhost (mx51.mymxserver.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bnra0yk5eUjR; Thu, 22 Oct 2009 15:35:42 +0200 (CEST) Received: from lin01.mn-solutions.de (pD95FA4CF.dip0.t-ipconnect.de [217.95.164.207]) by mx51.mymxserver.com (Postfix) with ESMTP id D03A614800A; Thu, 22 Oct 2009 15:35:41 +0200 (CEST) Received: by lin01.mn-solutions.de (Postfix, from userid 116) id 470711E0010; Thu, 22 Oct 2009 15:35:41 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.1.7-deb3 (2006-10-05) on lin01.mn-logistik.de X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.7-deb3 Received: from mnz66.mn-solutions.de (mnz66.mn-solutions.de [192.168.233.66]) by lin01.mn-solutions.de (Postfix) with SMTP id EC9CE1E00EE; Thu, 22 Oct 2009 15:34:35 +0200 (CEST) Received: by mnz66.mn-solutions.de (sSMTP sendmail emulation); Thu, 22 Oct 2009 15:34:19 +0200 Message-Id: <20091022133419.553612632@mail.mn-solutions.de> References: <20091022133043.185554096@mail.mn-solutions.de> User-Agent: quilt/0.46-1 Date: Thu, 22 Oct 2009 15:30:57 +0200 From: Holger Schurig To: linux-wireless@vger.kernel.org, John Linville , Dan Williams Subject: [PATCH 14/19] libertas: move mic failure event to wext.c Content-Disposition: inline; filename=lbs-iw-mic-failure.patch Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --- linux-wl.orig/drivers/net/wireless/libertas/cmdresp.c +++ linux-wl/drivers/net/wireless/libertas/cmdresp.c @@ -73,32 +73,6 @@ 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, u16 type, struct cmd_ds_command *resp) { @@ -477,12 +451,12 @@ case MACREG_INT_CODE_MIC_ERR_UNICAST: 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; case MACREG_INT_CODE_MIC_ERR_MULTICAST: 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; case MACREG_INT_CODE_MIB_CHANGED: --- linux-wl.orig/drivers/net/wireless/libertas/wext.c +++ linux-wl/drivers/net/wireless/libertas/wext.c @@ -54,7 +54,7 @@ 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; u8 buf[50]; @@ -79,6 +79,31 @@ } /** + * @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 * * @param priv A pointer to struct lbs_private structure --- linux-wl.orig/drivers/net/wireless/libertas/wext.h +++ linux-wl/drivers/net/wireless/libertas/wext.h @@ -5,7 +5,7 @@ #define _LBS_WEXT_H_ 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 mesh_handler_def;