From patchwork Mon Mar 21 21:17:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Stewart X-Patchwork-Id: 649001 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2LLcKXQ020553 for ; Mon, 21 Mar 2011 21:38:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754382Ab1CUViR (ORCPT ); Mon, 21 Mar 2011 17:38:17 -0400 Received: from smtp-out.google.com ([74.125.121.67]:50676 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754330Ab1CUViP (ORCPT ); Mon, 21 Mar 2011 17:38:15 -0400 Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id p2LLcDft020836 for ; Mon, 21 Mar 2011 14:38:14 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1300743494; bh=cx7Y0WLACxH/97dgiZmvVujezHo=; h=From:Date:Subject:To:Message-Id; b=RpxjzZlyTMhxYp/1XR1S1ADgtCOGqvuSRhaFRyQDhGTI2IgUhJUsnaKGeat+hGK3D dLa06Ymbu5U1JWlVB+64w== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=from:date:subject:to:message-id:x-system-of-record; b=CCZuGJoSLSIbM2BUSIFoM79qhqZpYAMde2PZnBzPyxJZdDRw8buHpRq0ilex35a0t KNGNmOhpmCTTgu+xg6EIA== Received: from glenhelen.mtv.corp.google.com (glenhelen.mtv.corp.google.com [172.22.72.223]) by wpaz1.hot.corp.google.com with ESMTP id p2LLcChA030827 for ; Mon, 21 Mar 2011 14:38:13 -0700 Received: by glenhelen.mtv.corp.google.com (Postfix, from userid 110058) id B606D20DEE; Mon, 21 Mar 2011 14:38:12 -0700 (PDT) From: Paul Stewart Date: Mon, 21 Mar 2011 14:17:54 -0700 Subject: [PATCH 4/4] mac80211: Add bss info to that exported to station To: linux-wireless@vger.kernel.org Message-Id: <20110321213812.B606D20DEE@glenhelen.mtv.corp.google.com> X-System-Of-Record: true Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 21 Mar 2011 21:38:20 +0000 (UTC) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 3342135..bf5d28d 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -342,7 +342,8 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo) STATION_INFO_TX_FAILED | STATION_INFO_TX_BITRATE | STATION_INFO_RX_BITRATE | - STATION_INFO_RX_DROP_MISC; + STATION_INFO_RX_DROP_MISC | + STATION_INFO_BSS_PARAM; sinfo->inactive_time = jiffies_to_msecs(jiffies - sta->last_rx); sinfo->rx_bytes = sta->rx_bytes; @@ -389,6 +390,16 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo) sinfo->plink_state = sta->plink_state; #endif } + + sinfo->bss_param.flags = 0; + if (sdata->vif.bss_conf.use_cts_prot) + sinfo->bss_param.flags |= BSS_PARAM_FLAGS_CTS_PROT; + if (sdata->vif.bss_conf.use_short_preamble) + sinfo->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_PREAMBLE; + if (sdata->vif.bss_conf.use_short_slot) + sinfo->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_SLOT_TIME; + sinfo->bss_param.dtim_period = sdata->local->hw.conf.ps_dtim_period; + sinfo->bss_param.beacon_interval = sdata->vif.bss_conf.beacon_int; }