LinuxKPI: 802.11: implement ieee80211_beacon_loss()
Implement ieee80211_beacon_loss() similar to ieee80211_connection_loss() with different state handling. While here leave a comment in connection_loss() about the state change argument. Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
91b4225aa1
commit
bb81db90f7
@ -904,6 +904,7 @@ void linuxkpi_ieee80211_txq_get_depth(struct ieee80211_txq *, uint64_t *,
|
||||
uint64_t *);
|
||||
struct wireless_dev *linuxkpi_ieee80211_vif_to_wdev(struct ieee80211_vif *);
|
||||
void linuxkpi_ieee80211_connection_loss(struct ieee80211_vif *);
|
||||
void linuxkpi_ieee80211_beacon_loss(struct ieee80211_vif *);
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
@ -1403,7 +1404,7 @@ ieee80211_beacon_get_template(struct ieee80211_hw *hw,
|
||||
static __inline void
|
||||
ieee80211_beacon_loss(struct ieee80211_vif *vif)
|
||||
{
|
||||
TODO();
|
||||
linuxkpi_ieee80211_beacon_loss(vif);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
|
@ -3708,13 +3708,39 @@ linuxkpi_ieee80211_connection_loss(struct ieee80211_vif *vif)
|
||||
* Let the statemachine handle all neccessary changes.
|
||||
*/
|
||||
nstate = IEEE80211_S_INIT;
|
||||
arg = 0;
|
||||
arg = 0; /* Not a valid reason. */
|
||||
|
||||
if (debug_80211 & D80211_TRACE)
|
||||
ic_printf(vap->iv_ic, "%s: vif %p\n", __func__, vif);
|
||||
ieee80211_new_state(vap, nstate, arg);
|
||||
}
|
||||
|
||||
void
|
||||
linuxkpi_ieee80211_beacon_loss(struct ieee80211_vif *vif)
|
||||
{
|
||||
struct lkpi_vif *lvif;
|
||||
struct ieee80211vap *vap;
|
||||
enum ieee80211_state nstate;
|
||||
int arg;
|
||||
|
||||
lvif = VIF_TO_LVIF(vif);
|
||||
vap = LVIF_TO_VAP(lvif);
|
||||
|
||||
/*
|
||||
* Go to scan; otherwise we need to elaborately check state and
|
||||
* handle accordingly, e.g., if in RUN we could call iv_bmiss.
|
||||
* Let the statemachine handle all neccessary changes.
|
||||
*/
|
||||
nstate = IEEE80211_S_SCAN;
|
||||
arg = 0;
|
||||
|
||||
/* We should be in RUN. Can we assert that? */
|
||||
if (debug_80211 & D80211_TRACE || vap->iv_state != IEEE80211_S_RUN)
|
||||
ic_printf(vap->iv_ic, "%s: vif %p vap %p state %s\n", __func__,
|
||||
vif, vap, ieee80211_state_name[vap->iv_state]);
|
||||
ieee80211_new_state(vap, nstate, arg);
|
||||
}
|
||||
|
||||
MODULE_VERSION(linuxkpi_wlan, 1);
|
||||
MODULE_DEPEND(linuxkpi_wlan, linuxkpi, 1, 1, 1);
|
||||
MODULE_DEPEND(linuxkpi_wlan, wlan, 1, 1, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user