diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2020-04-10 15:32:35 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-13 14:42:49 +0200 |
commit | e836ad4e2da4c4472bb08c15fcd60493d5a09d64 (patch) | |
tree | a12861152bb30aacd24182e3f889af014a68963e /drivers | |
parent | 17c8cc79ef72a5791a7c5223d9f5905cdaa69f30 (diff) | |
download | linux-e836ad4e2da4c4472bb08c15fcd60493d5a09d64.tar.bz2 |
staging: wfx: introduce wfx_join_ibss() and wfx_leave_ibss()
Currently, IBSS networks are started by the mean of
wfx_bss_info_changed(). It easier to use use callbacks provided by
mac80211.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200410133239.438347-16-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/wfx/main.c | 2 | ||||
-rw-r--r-- | drivers/staging/wfx/sta.c | 19 | ||||
-rw-r--r-- | drivers/staging/wfx/sta.h | 2 |
3 files changed, 21 insertions, 2 deletions
diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index b459fac928fd..b8a01ba0d381 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -133,6 +133,8 @@ static const struct ieee80211_ops wfx_ops = { .remove_interface = wfx_remove_interface, .config = wfx_config, .tx = wfx_tx, + .join_ibss = wfx_join_ibss, + .leave_ibss = wfx_leave_ibss, .conf_tx = wfx_conf_tx, .hw_scan = wfx_hw_scan, .cancel_hw_scan = wfx_cancel_hw_scan, diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 8aa373f5deae..21eceafc9a95 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -648,6 +648,22 @@ static void wfx_join_finalize(struct wfx_vif *wvif, } } +int wfx_join_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif) +{ + struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; + + wfx_upload_ap_templates(wvif); + wfx_do_join(wvif); + return 0; +} + +void wfx_leave_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif) +{ + struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; + + wfx_do_unjoin(wvif); +} + void wfx_enable_beacon(struct wfx_vif *wvif, bool enable) { // Driver has Content After DTIM Beacon in queue. Driver is waiting for @@ -688,8 +704,7 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, if (changed & BSS_CHANGED_BASIC_RATES || changed & BSS_CHANGED_BEACON_INT || changed & BSS_CHANGED_BSSID) { - if (vif->type == NL80211_IFTYPE_STATION || - vif->type == NL80211_IFTYPE_ADHOC) + if (vif->type == NL80211_IFTYPE_STATION) wfx_do_join(wvif); } diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h index 6a4b91a47f5b..3002d89dc871 100644 --- a/drivers/staging/wfx/sta.h +++ b/drivers/staging/wfx/sta.h @@ -56,6 +56,8 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif); void wfx_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif); int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif); void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif); +int wfx_join_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif); +void wfx_leave_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif); int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue, const struct ieee80211_tx_queue_params *params); void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |