Commit 249802e8 authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman

staging: wfx: drop wvif->dtim_period

It is not necessary to keep a copy of dtim_period in wfx_vif. Prefer to
just rely on bss_conf->dtim_period.
Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-23-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b0674e06
...@@ -464,7 +464,6 @@ static void wfx_do_unjoin(struct wfx_vif *wvif) ...@@ -464,7 +464,6 @@ static void wfx_do_unjoin(struct wfx_vif *wvif)
hif_keep_alive_period(wvif, 0); hif_keep_alive_period(wvif, 0);
hif_reset(wvif, false); hif_reset(wvif, false);
wfx_tx_policy_init(wvif); wfx_tx_policy_init(wvif);
wvif->dtim_period = 0;
hif_set_macaddr(wvif, wvif->vif->addr); hif_set_macaddr(wvif, wvif->vif->addr);
wfx_free_event_queue(wvif); wfx_free_event_queue(wvif);
cancel_work_sync(&wvif->event_handler_work); cancel_work_sync(&wvif->event_handler_work);
...@@ -557,10 +556,6 @@ static void wfx_do_join(struct wfx_vif *wvif) ...@@ -557,10 +556,6 @@ static void wfx_do_join(struct wfx_vif *wvif)
wvif->beacon_int = 1; wvif->beacon_int = 1;
join.beacon_interval = wvif->beacon_int; join.beacon_interval = wvif->beacon_int;
// DTIM period will be set on first Beacon
wvif->dtim_period = 0;
join.channel_number = wvif->channel->hw_value; join.channel_number = wvif->channel->hw_value;
memcpy(join.bssid, bssid, sizeof(join.bssid)); memcpy(join.bssid, bssid, sizeof(join.bssid));
...@@ -701,8 +696,6 @@ static int wfx_start_ap(struct wfx_vif *wvif) ...@@ -701,8 +696,6 @@ static int wfx_start_ap(struct wfx_vif *wvif)
int ret; int ret;
wvif->beacon_int = wvif->vif->bss_conf.beacon_int; wvif->beacon_int = wvif->vif->bss_conf.beacon_int;
wvif->dtim_period = wvif->vif->bss_conf.dtim_period;
memset(&wvif->link_id_db, 0, sizeof(wvif->link_id_db)); memset(&wvif->link_id_db, 0, sizeof(wvif->link_id_db));
wvif->wdev->tx_burst_idx = -1; wvif->wdev->tx_burst_idx = -1;
...@@ -766,10 +759,7 @@ static void wfx_join_finalize(struct wfx_vif *wvif, ...@@ -766,10 +759,7 @@ static void wfx_join_finalize(struct wfx_vif *wvif,
struct ieee80211_sta *sta = NULL; struct ieee80211_sta *sta = NULL;
struct hif_mib_set_association_mode association_mode = { }; struct hif_mib_set_association_mode association_mode = { };
if (info->dtim_period)
wvif->dtim_period = info->dtim_period;
wvif->beacon_int = info->beacon_int; wvif->beacon_int = info->beacon_int;
rcu_read_lock(); rcu_read_lock();
if (info->bssid && !info->ibss_joined) if (info->bssid && !info->ibss_joined)
sta = ieee80211_find_sta(wvif->vif, info->bssid); sta = ieee80211_find_sta(wvif->vif, info->bssid);
...@@ -804,9 +794,6 @@ static void wfx_join_finalize(struct wfx_vif *wvif, ...@@ -804,9 +794,6 @@ static void wfx_join_finalize(struct wfx_vif *wvif,
wvif->bss_params.beacon_lost_count = 20; wvif->bss_params.beacon_lost_count = 20;
wvif->bss_params.aid = info->aid; wvif->bss_params.aid = info->aid;
if (wvif->dtim_period < 1)
wvif->dtim_period = 1;
hif_set_association_mode(wvif, &association_mode); hif_set_association_mode(wvif, &association_mode);
if (!info->ibss_joined) { if (!info->ibss_joined) {
...@@ -1055,9 +1042,10 @@ int wfx_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set) ...@@ -1055,9 +1042,10 @@ int wfx_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set)
static void wfx_mcast_start_work(struct work_struct *work) static void wfx_mcast_start_work(struct work_struct *work)
{ {
struct wfx_vif *wvif = container_of(work, struct wfx_vif, struct wfx_vif *wvif =
mcast_start_work); container_of(work, struct wfx_vif, mcast_start_work);
long tmo = wvif->dtim_period * TU_TO_JIFFIES(wvif->beacon_int + 20); struct ieee80211_bss_conf *conf = &wvif->vif->bss_conf;
long tmo = conf->dtim_period * TU_TO_JIFFIES(wvif->beacon_int + 20);
cancel_work_sync(&wvif->mcast_stop_work); cancel_work_sync(&wvif->mcast_stop_work);
if (!wvif->aid0_bit_set) { if (!wvif->aid0_bit_set) {
......
...@@ -98,7 +98,6 @@ struct wfx_vif { ...@@ -98,7 +98,6 @@ struct wfx_vif {
spinlock_t ps_state_lock; spinlock_t ps_state_lock;
struct work_struct set_tim_work; struct work_struct set_tim_work;
int dtim_period;
int beacon_int; int beacon_int;
bool enable_beacon; bool enable_beacon;
bool filter_bssid; bool filter_bssid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment