diff options
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 68329d713c02..d34c7c3dd762 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -60,6 +60,11 @@ static int ieee80211_change_iface(struct wiphy *wiphy, if (ret) return ret; + if (ieee80211_vif_is_mesh(&sdata->vif) && params->mesh_id_len) + ieee80211_sdata_set_mesh_id(sdata, + params->mesh_id_len, + params->mesh_id); + if (type == NL80211_IFTYPE_AP_VLAN && params && params->use_4addr == 0) rcu_assign_pointer(sdata->u.vlan.sta, NULL); @@ -998,9 +1003,9 @@ static inline bool _chg_mesh_attr(enum nl80211_meshconf_params parm, u32 mask) return (mask >> (parm-1)) & 0x1; } -static int ieee80211_update_mesh_params(struct wiphy *wiphy, - struct net_device *dev, u32 mask, - const struct mesh_config *nconf) +static int ieee80211_set_mesh_params(struct wiphy *wiphy, + struct net_device *dev, + const struct mesh_config *nconf, u32 mask) { struct mesh_config *conf; struct ieee80211_sub_if_data *sdata; @@ -1051,30 +1056,6 @@ static int ieee80211_update_mesh_params(struct wiphy *wiphy, return 0; } -static int ieee80211_join_mesh(struct wiphy *wiphy, struct net_device *dev, - const struct mesh_config *conf, - const struct mesh_setup *setup) -{ - struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); - struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; - - memcpy(&sdata->u.mesh.mshcfg, conf, sizeof(struct mesh_config)); - ifmsh->mesh_id_len = setup->mesh_id_len; - memcpy(ifmsh->mesh_id, setup->mesh_id, ifmsh->mesh_id_len); - - ieee80211_start_mesh(sdata); - - return 0; -} - -static int ieee80211_leave_mesh(struct wiphy *wiphy, struct net_device *dev) -{ - struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); - - ieee80211_stop_mesh(sdata); - - return 0; -} #endif static int ieee80211_change_bss(struct wiphy *wiphy, @@ -1779,10 +1760,8 @@ struct cfg80211_ops mac80211_config_ops = { .change_mpath = ieee80211_change_mpath, .get_mpath = ieee80211_get_mpath, .dump_mpath = ieee80211_dump_mpath, - .update_mesh_params = ieee80211_update_mesh_params, + .set_mesh_params = ieee80211_set_mesh_params, .get_mesh_params = ieee80211_get_mesh_params, - .join_mesh = ieee80211_join_mesh, - .leave_mesh = ieee80211_leave_mesh, #endif .change_bss = ieee80211_change_bss, .set_txq_params = ieee80211_set_txq_params, |