aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/wext.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-01 15:26:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:01:52 -0400
commitab737a4f7dbe57b12b73f482a7b973bf00b41942 (patch)
tree33f3c44073921b9fa4c96ea5501dbfcad59567ac /net/mac80211/wext.c
parentbc92afd92088ab41223383cc6863ab4792533c54 (diff)
cfg80211: implement IWAP for WDS
This implements siocsiwap/giwap for WDS mode. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r--net/mac80211/wext.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index f77929802c7a..4053d766af2d 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -140,23 +140,8 @@ static int ieee80211_ioctl_siwap(struct net_device *dev,
140 if (sdata->vif.type == NL80211_IFTYPE_STATION) 140 if (sdata->vif.type == NL80211_IFTYPE_STATION)
141 return cfg80211_mgd_wext_siwap(dev, info, ap_addr, extra); 141 return cfg80211_mgd_wext_siwap(dev, info, ap_addr, extra);
142 142
143 if (sdata->vif.type == NL80211_IFTYPE_WDS) { 143 if (sdata->vif.type == NL80211_IFTYPE_WDS)
144 /* 144 return cfg80211_wds_wext_siwap(dev, info, ap_addr, extra);
145 * If it is necessary to update the WDS peer address
146 * while the interface is running, then we need to do
147 * more work here, namely if it is running we need to
148 * add a new and remove the old STA entry, this is
149 * normally handled by _open() and _stop().
150 */
151 if (netif_running(dev))
152 return -EBUSY;
153
154 memcpy(&sdata->u.wds.remote_addr, (u8 *) &ap_addr->sa_data,
155 ETH_ALEN);
156
157 return 0;
158 }
159
160 return -EOPNOTSUPP; 145 return -EOPNOTSUPP;
161} 146}
162 147
@@ -173,11 +158,8 @@ static int ieee80211_ioctl_giwap(struct net_device *dev,
173 if (sdata->vif.type == NL80211_IFTYPE_STATION) 158 if (sdata->vif.type == NL80211_IFTYPE_STATION)
174 return cfg80211_mgd_wext_giwap(dev, info, ap_addr, extra); 159 return cfg80211_mgd_wext_giwap(dev, info, ap_addr, extra);
175 160
176 if (sdata->vif.type == NL80211_IFTYPE_WDS) { 161 if (sdata->vif.type == NL80211_IFTYPE_WDS)
177 ap_addr->sa_family = ARPHRD_ETHER; 162 return cfg80211_wds_wext_giwap(dev, info, ap_addr, extra);
178 memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN);
179 return 0;
180 }
181 163
182 return -EOPNOTSUPP; 164 return -EOPNOTSUPP;
183} 165}