From patchwork Thu Oct 22 12:15:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Schurig X-Patchwork-Id: 55310 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 n9MCGBXH002477 for ; Thu, 22 Oct 2009 12:16:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755323AbZJVMQD (ORCPT ); Thu, 22 Oct 2009 08:16:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755317AbZJVMQD (ORCPT ); Thu, 22 Oct 2009 08:16:03 -0400 Received: from mx51.mymxserver.com ([85.199.173.110]:28240 "EHLO mx51.mymxserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755301AbZJVMQB (ORCPT ); Thu, 22 Oct 2009 08:16:01 -0400 Received: from localhost (localhost [127.0.0.1]) by localhost.mx51.mymxserver.com (Postfix) with ESMTP id A467B3A00B; Thu, 22 Oct 2009 14:16:05 +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 x1sRj9QpnGBj; Thu, 22 Oct 2009 14:16:05 +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 710BE3A00E; Thu, 22 Oct 2009 14:16:04 +0200 (CEST) Received: by lin01.mn-solutions.de (Postfix, from userid 116) id DF4931E004F; Thu, 22 Oct 2009 14:16:03 +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 20CC81E0010; Thu, 22 Oct 2009 14:15:55 +0200 (CEST) From: Holger Schurig To: linux-wireless@vger.kernel.org, John Linville , Dan Williams Subject: [PATCH] libertas: remove some references to IW_MODE_abc Date: Thu, 22 Oct 2009 14:15:38 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200910221415.38459.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 @@ -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);