From patchwork Mon Oct 19 11:18:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Schurig X-Patchwork-Id: 54747 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 n9JBIsvX028140 for ; Mon, 19 Oct 2009 11:18:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755827AbZJSLSs (ORCPT ); Mon, 19 Oct 2009 07:18:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751389AbZJSLSs (ORCPT ); Mon, 19 Oct 2009 07:18:48 -0400 Received: from mx51.mymxserver.com ([85.199.173.110]:31754 "EHLO mx51.mymxserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751121AbZJSLSs (ORCPT ); Mon, 19 Oct 2009 07:18:48 -0400 Received: from localhost (localhost [127.0.0.1]) by localhost.mx51.mymxserver.com (Postfix) with ESMTP id 2EB4050011; Mon, 19 Oct 2009 13:18:51 +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 lIJJi+BGn2nP; Mon, 19 Oct 2009 13:18:51 +0200 (CEST) Received: from lin01.mn-solutions.de (pD95F95A1.dip0.t-ipconnect.de [217.95.149.161]) by mx51.mymxserver.com (Postfix) with ESMTP id 646E35000E; Mon, 19 Oct 2009 13:18:50 +0200 (CEST) Received: by lin01.mn-solutions.de (Postfix, from userid 116) id EA5D81E004F; Mon, 19 Oct 2009 13:18:49 +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 ESMTP id D2DDE1E0010; Mon, 19 Oct 2009 13:18:40 +0200 (CEST) From: Holger Schurig To: "linux-wireless" , John Linville , Dan Williams Subject: [PATCH] libertas: move lbs_send_iwevcustom_event() to wext.c Date: Mon, 19 Oct 2009 13:18:28 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200910191318.29024.hs4233@mail.mn-solutions.de> 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/cmd.c +++ linux-wl/drivers/net/wireless/libertas/cmd.c @@ -1543,30 +1543,6 @@ return ret; } -void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str) -{ - union iwreq_data iwrq; - u8 buf[50]; - - lbs_deb_enter(LBS_DEB_WEXT); - - memset(&iwrq, 0, sizeof(union iwreq_data)); - memset(buf, 0, sizeof(buf)); - - snprintf(buf, sizeof(buf) - 1, "%s", str); - - iwrq.data.length = strlen(buf) + 1 + IW_EV_LCP_LEN; - - /* Send Event to upper layer */ - lbs_deb_wext("event indication string %s\n", (char *)buf); - lbs_deb_wext("event indication length %d\n", iwrq.data.length); - lbs_deb_wext("sending wireless event IWEVCUSTOM for %s\n", str); - - wireless_send_event(priv->dev, IWEVCUSTOM, &iwrq, buf); - - lbs_deb_leave(LBS_DEB_WEXT); -} - static void lbs_send_confirmsleep(struct lbs_private *priv) { unsigned long flags; --- linux-wl.orig/drivers/net/wireless/libertas/decl.h +++ linux-wl/drivers/net/wireless/libertas/decl.h @@ -44,8 +44,6 @@ u8 band, u16 channel); -void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str); - /* persistcfg.c */ void lbs_persist_config_init(struct net_device *net); void lbs_persist_config_remove(struct net_device *net); --- linux-wl.orig/drivers/net/wireless/libertas/wext.c +++ linux-wl/drivers/net/wireless/libertas/wext.c @@ -45,6 +45,30 @@ priv->pending_assoc_req = NULL; } +void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str) +{ + union iwreq_data iwrq; + u8 buf[50]; + + lbs_deb_enter(LBS_DEB_WEXT); + + memset(&iwrq, 0, sizeof(union iwreq_data)); + memset(buf, 0, sizeof(buf)); + + snprintf(buf, sizeof(buf) - 1, "%s", str); + + iwrq.data.length = strlen(buf) + 1 + IW_EV_LCP_LEN; + + /* Send Event to upper layer */ + lbs_deb_wext("event indication string %s\n", (char *)buf); + lbs_deb_wext("event indication length %d\n", iwrq.data.length); + lbs_deb_wext("sending wireless event IWEVCUSTOM for %s\n", str); + + wireless_send_event(priv->dev, IWEVCUSTOM, &iwrq, buf); + + lbs_deb_leave(LBS_DEB_WEXT); +} + /** * @brief Find the channel frequency power info with specific channel * --- linux-wl.orig/drivers/net/wireless/libertas/wext.h +++ linux-wl/drivers/net/wireless/libertas/wext.h @@ -4,6 +4,8 @@ #ifndef _LBS_WEXT_H_ #define _LBS_WEXT_H_ +void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str); + extern struct iw_handler_def lbs_handler_def; extern struct iw_handler_def mesh_handler_def;