From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Berg Subject: Re: [PATCH 5/7] d80211: indicate if unassociate/radio off status Date: Fri, 22 Sep 2006 10:32:17 +0200 Message-ID: <1158913937.5368.10.camel@ux156> References: <44F356DF.9000000@linux.intel.com> <20060921190126.4d884c44@logostar.upir.cz> <1158865436.27546.23.camel@localhost.localdomain> <4512EC5C.1030807@linux.intel.com> <1158870634.5769.21.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: mabbas , Jiri Benc , netdev@vger.kernel.org Return-path: Received: from crystal.sipsolutions.net ([195.210.38.204]:6786 "EHLO sipsolutions.net") by vger.kernel.org with ESMTP id S932124AbWIVIbf (ORCPT ); Fri, 22 Sep 2006 04:31:35 -0400 To: Dan Williams In-Reply-To: <1158870634.5769.21.camel@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Thu, 2006-09-21 at 16:30 -0400, Dan Williams wrote: > That's kind a hole in the WE API. In this case, I think, SIOCGIWAP > should always return the BSSID of the current association, or none if > there is no association. I was never sure if it was a hole or just a lack of clearly defined semantics (duh, I should probably look at the iwconfig code......) > Doing an iwconfig ap xx:xx:xx:xx:xx:xx should make the driver internally > locked to that BSSID, such that until you clear that lock, SIOCGIWAP > should only show either that BSSID or 00:00:00:00:00:00. SIOCGIWAP > should not return a valid BSSID when there is no association. > > Hopefully nl80211 can fix this omission in WE. I think I have addressed this already. + /* set access point BSSID for userspace roaming */ + NL80211_CMD_SET_BSSID, ... + + /* BSSID to associate to, only used when roaming control + * is in userspace */ + NL80211_ATTR_BSSID, + ... + /* get current association information, if not associated then + * the BSSID attribute is not present in response */ + NL80211_CMD_GET_ASSOCIATION, as well as in the compatibility document: +SIOCSIWAP + -> if bssid is all-ones: set roaming to kernel, reassociate + -> if bssid is all-zeroes: set roaming to kernel + -> otherwise: set roaming to userspace, set bssid + +SIOCGIWAP + -> get association parameters and fill return bssid appropriately I think that should do what you need, no? johannes