From patchwork Wed Aug 5 20:23:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave X-Patchwork-Id: 39436 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 n75KOvKk007521 for ; Wed, 5 Aug 2009 20:24:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752629AbZHEUY2 (ORCPT ); Wed, 5 Aug 2009 16:24:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752596AbZHEUY2 (ORCPT ); Wed, 5 Aug 2009 16:24:28 -0400 Received: from mail-ew0-f214.google.com ([209.85.219.214]:42204 "EHLO mail-ew0-f214.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752629AbZHEUY1 (ORCPT ); Wed, 5 Aug 2009 16:24:27 -0400 Received: by mail-ew0-f214.google.com with SMTP id 10so285565ewy.37 for ; Wed, 05 Aug 2009 13:24:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=Pah3EupJNyvMISS172rN/B4lYHLSH6s6Dcd8p5lkwRI=; b=g7j33siH078iXXjrQmUNo2CsyhxqVXHF6tD/a7Eim5KOAS/JSnWmm2YxBE4L5EVrp5 rkSxg0Pck4h+CmOP+keooNQSu83i0et5paUNYsfnlby44gHHU31Q0GhT3FT4Uy3TXJj1 uzYVY4+IGynlBHsRB4zReuHnAB9dE8ln6EIqs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=KZlGcuRh2c6tKfOaoFQPVfEnpmHx9LIhF2uztZycY/w57BPvt+EqoGctZAH/0FtnhM Q8vMf7T4DLwpPM4qLjM0Lt0EW0vJr/YdxNoV/Wrn9Q6A8rwA3YeVcKvQnEw+N+XhzNrC IvMRrLlv4z462CtwIbSSDBPUEm7I7IEqTINMg= Received: by 10.210.10.8 with SMTP id 8mr474118ebj.82.1249503868508; Wed, 05 Aug 2009 13:24:28 -0700 (PDT) Received: from borken (5ac998cf.bb.sky.com [90.201.152.207]) by mx.google.com with ESMTPS id 5sm944950eyf.8.2009.08.05.13.24.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 05 Aug 2009 13:24:28 -0700 (PDT) Received: by borken (sSMTP sendmail emulation); Wed, 05 Aug 2009 21:24:25 +0100 From: David Kilroy To: linux-wireless@vger.kernel.org Cc: orinoco-devel@lists.sourceforge.net, David Kilroy Subject: [PATCH 5/6] orinoco: add function to retrieve current bssid Date: Wed, 5 Aug 2009 21:23:31 +0100 Message-Id: <1249503812-16921-6-git-send-email-kilroyd@googlemail.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1249503812-16921-1-git-send-email-kilroyd@googlemail.com> References: <1249503812-16921-1-git-send-email-kilroyd@googlemail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org We will need this from the cfg80211 disassociate call. Signed-off-by: David Kilroy --- drivers/net/wireless/orinoco/hw.c | 12 ++++++++++++ drivers/net/wireless/orinoco/hw.h | 2 ++ drivers/net/wireless/orinoco/wext.c | 4 +--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c index 3e9021c..5b12654 100644 --- a/drivers/net/wireless/orinoco/hw.c +++ b/drivers/net/wireless/orinoco/hw.c @@ -1272,3 +1272,15 @@ int orinoco_hw_disassociate(struct orinoco_private *priv, &buf); return err; } + +int orinoco_hw_get_current_bssid(struct orinoco_private *priv, + u8 *addr) +{ + hermes_t *hw = &priv->hw; + int err; + + err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENTBSSID, + ETH_ALEN, NULL, addr); + + return err; +} diff --git a/drivers/net/wireless/orinoco/hw.h b/drivers/net/wireless/orinoco/hw.h index b096786..8df6e87 100644 --- a/drivers/net/wireless/orinoco/hw.h +++ b/drivers/net/wireless/orinoco/hw.h @@ -53,5 +53,7 @@ int orinoco_hw_trigger_scan(struct orinoco_private *priv, const struct cfg80211_ssid *ssid); int orinoco_hw_disassociate(struct orinoco_private *priv, u8 *addr, u16 reason_code); +int orinoco_hw_get_current_bssid(struct orinoco_private *priv, + u8 *addr); #endif /* _ORINOCO_HW_H_ */ diff --git a/drivers/net/wireless/orinoco/wext.c b/drivers/net/wireless/orinoco/wext.c index f324bf9..f68bbe3 100644 --- a/drivers/net/wireless/orinoco/wext.c +++ b/drivers/net/wireless/orinoco/wext.c @@ -156,7 +156,6 @@ static int orinoco_ioctl_getwap(struct net_device *dev, { struct orinoco_private *priv = ndev_priv(dev); - hermes_t *hw = &priv->hw; int err = 0; unsigned long flags; @@ -164,8 +163,7 @@ static int orinoco_ioctl_getwap(struct net_device *dev, return -EBUSY; ap_addr->sa_family = ARPHRD_ETHER; - err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENTBSSID, - ETH_ALEN, NULL, ap_addr->sa_data); + err = orinoco_hw_get_current_bssid(priv, ap_addr->sa_data); orinoco_unlock(priv, &flags);