Skip to contentSkip to conversation

mac80211: add sta item when changing WDS address

PATCH In review Johannes Berg 3 participants 5 messages Mar 28, 2007 – Apr 27, 2007 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: add sta item when changing WDS address

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.

---
 net/mac80211/ieee80211.c |    9 +++++++++
 1 file changed, 9 insertions(+)
net/mac80211/ieee80211.c +9 -0
@@ -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) {
author maintainer
#1 lore raw
Quoted 2 lines · Johannes Berg

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.

Anything wrong with this patch? :)

Quoted 18 lines
net/mac80211/ieee80211.c +9 -0
@@ -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) {
#2 lore raw
Quoted 5 lines · Johannes Berg
Quoted 2 lines · Johannes Berg

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.

Anything wrong with this patch? :)

It's in wireless-dev for quite some time (commit d80bb18ca3444520b465f3006bbb78837a5e28d9). Did I miss some problem when I was looking at the patch?

Jiri

Signature · 2 lines
Jiri Benc
SUSE Labs
author maintainer
#3 lore raw
Quoted 10 lines · Jiri Benc
Quoted 5 lines · Johannes Berg
Quoted 2 lines · Johannes Berg

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.

Anything wrong with this patch? :)

It's in wireless-dev for quite some time (commit d80bb18ca3444520b465f3006bbb78837a5e28d9). Did I miss some problem when I was looking at the patch?

No no! I just thought it wasn't because quilt managed to apply the patch over it being applied already and so it was still in my patch queue.

johannes

#4 lore raw
In reply to Johannes Berg
Quoted 5 lines · Johannes Berg
Quoted 2 lines · Johannes Berg

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.

Anything wrong with this patch? :)

Hopefully nothing...I merged it as commit d80bb18ca3444520b465f3006bbb78837a5e28d9.

John

Signature · 2 lines
John W. Linville
[email protected]