From patchwork Thu Oct 22 13:30:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Schurig X-Patchwork-Id: 55347 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 n9MDZsp8017550 for ; Thu, 22 Oct 2009 13:35:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756092AbZJVNfs (ORCPT ); Thu, 22 Oct 2009 09:35:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756083AbZJVNfs (ORCPT ); Thu, 22 Oct 2009 09:35:48 -0400 Received: from mx51.mymxserver.com ([85.199.173.110]:3053 "EHLO mx51.mymxserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756078AbZJVNfr (ORCPT ); Thu, 22 Oct 2009 09:35:47 -0400 Received: from localhost (localhost [127.0.0.1]) by localhost.mx51.mymxserver.com (Postfix) with ESMTP id 95E3814800E; Thu, 22 Oct 2009 15:35: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 Rg7EfgTj6th5; Thu, 22 Oct 2009 15:35:51 +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 CCAD114801D; Thu, 22 Oct 2009 15:35:50 +0200 (CEST) Received: by lin01.mn-solutions.de (Postfix, from userid 116) id 4EE651E0010; Thu, 22 Oct 2009 15:35:50 +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 9E8321E005A; Thu, 22 Oct 2009 15:34:39 +0200 (CEST) Received: by mnz66.mn-solutions.de (sSMTP sendmail emulation); Thu, 22 Oct 2009 15:34:23 +0200 Message-Id: <20091022133423.233671310@mail.mn-solutions.de> References: <20091022133043.185554096@mail.mn-solutions.de> User-Agent: quilt/0.46-1 Date: Thu, 22 Oct 2009 15:30:59 +0200 From: Holger Schurig To: linux-wireless@vger.kernel.org, John Linville , Dan Williams Subject: [PATCH 16/19] libertas: remove some references to IW_MODE_abc Content-Disposition: inline; filename=lbs-remove-wext-from-cmd-c.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/cmd.c +++ linux-wl/drivers/net/wireless/libertas/cmd.c @@ -390,7 +390,7 @@ switch (oid) { case SNMP_MIB_OID_BSS_TYPE: cmd.bufsize = cpu_to_le16(sizeof(u8)); - cmd.value[0] = (val == IW_MODE_ADHOC) ? 2 : 1; + cmd.value[0] = val; break; case SNMP_MIB_OID_11D_ENABLE: case SNMP_MIB_OID_FRAG_THRESHOLD: @@ -443,13 +443,7 @@ switch (le16_to_cpu(cmd.bufsize)) { case sizeof(u8): - if (oid == SNMP_MIB_OID_BSS_TYPE) { - if (cmd.value[0] == 2) - *out_val = IW_MODE_ADHOC; - else - *out_val = IW_MODE_INFRA; - } else - *out_val = cmd.value[0]; + *out_val = cmd.value[0]; break; case sizeof(u16): *out_val = le16_to_cpu(*((__le16 *)(&cmd.value))); --- linux-wl.orig/drivers/net/wireless/libertas/assoc.c +++ linux-wl/drivers/net/wireless/libertas/assoc.c @@ -1567,7 +1567,8 @@ } priv->mode = assoc_req->mode; - ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_BSS_TYPE, assoc_req->mode); + ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_BSS_TYPE, + assoc_req->mode == IW_MODE_ADHOC ? 2 : 1); done: lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);