All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless <linux-wireless@vger.kernel.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH 2/2] mac80211: implement the callback for querying the operating frequency
Date: Sun, 17 Jan 2010 20:55:49 +0100	[thread overview]
Message-ID: <4B536B45.7000903@openwrt.org> (raw)
In-Reply-To: <4B536B05.6070301@openwrt.org>

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1154,6 +1154,18 @@ static int ieee80211_set_txq_params(stru
 	return 0;
 }
 
+static int ieee80211_get_oper_channel(struct wiphy *wiphy,
+				 struct ieee80211_channel **chan,
+				 enum nl80211_channel_type *channel_type)
+{
+	struct ieee80211_local *local = wiphy_priv(wiphy);
+
+	*chan = local->oper_channel;
+	*channel_type = local->oper_channel_type;
+
+	return 0;
+}
+
 static int ieee80211_set_channel(struct wiphy *wiphy,
 				 struct ieee80211_channel *chan,
 				 enum nl80211_channel_type channel_type)
@@ -1494,6 +1506,7 @@ struct cfg80211_ops mac80211_config_ops 
 #endif
 	.change_bss = ieee80211_change_bss,
 	.set_txq_params = ieee80211_set_txq_params,
+	.get_channel = ieee80211_get_oper_channel,
 	.set_channel = ieee80211_set_channel,
 	.suspend = ieee80211_suspend,
 	.resume = ieee80211_resume,

  reply	other threads:[~2010-01-17 19:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-17 19:54 [PATCH 1/2] cfg80211: add a callback for querying the operating frequency and export it through nl80211 Felix Fietkau
2010-01-17 19:55 ` Felix Fietkau [this message]
2010-01-17 19:57 ` Johannes Berg
2010-01-17 20:00   ` Johannes Berg
2010-01-17 20:12     ` Felix Fietkau
2010-01-17 20:14       ` Johannes Berg
2010-01-17 20:23         ` Felix Fietkau
2010-01-17 20:48           ` Johannes Berg
2010-01-17 21:01             ` Felix Fietkau
2010-01-17 21:03               ` Felix Fietkau
2010-01-17 21:05               ` Johannes Berg
2010-01-19 17:39                 ` Luis R. Rodriguez
2010-01-20  7:32                 ` Holger Schurig
2010-01-20  9:49                   ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B536B45.7000903@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.