From: Johannes Berg <johannes@sipsolutions.net>
To: Jiri Benc <jbenc@suse.cz>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: add sta item when changing WDS address
Date: Tue, 27 Mar 2007 18:01:17 +0200 [thread overview]
Message-ID: <1175011277.9282.8.camel@johannes.berg> (raw)
This patch adds a sta item for the new address when you change a WDS
link's address. If the sta item cannot be created return an error.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/ieee80211.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- wireless-dev.orig/net/mac80211/ieee80211.c 2007-03-27 16:33:29.523155480 +0200
+++ wireless-dev/net/mac80211/ieee80211.c 2007-03-27 16:33:47.163155480 +0200
@@ -4418,6 +4418,15 @@ int ieee80211_if_update_wds(struct net_d
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct sta_info *sta;
+ if (compare_ether_addr(remote_addr, sdata->u.wds.remote_addr) == 0)
+ return 0;
+
+ /* Create STA entry for the new peer */
+ sta = sta_info_add(local, dev, remote_addr, GFP_KERNEL);
+ if (!sta)
+ return -ENOMEM;
+ sta_info_put(sta);
+
/* Remove STA entry for the old peer */
sta = sta_info_get(local, sdata->u.wds.remote_addr);
if (sta) {
next reply other threads:[~2007-03-28 9:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-27 16:01 Johannes Berg [this message]
2007-04-27 15:12 ` [PATCH] mac80211: add sta item when changing WDS address Johannes Berg
2007-04-27 15:21 ` John W. Linville
2007-04-27 15:23 ` Jiri Benc
2007-04-27 15:29 ` 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=1175011277.9282.8.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=jbenc@suse.cz \
--cc=linux-wireless@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox