The ni_rctls checks are used to verify that a ratectl algo has set up
its internal data. This has been used to bypass missing calls in drivers which do not use the ratectl framework correctly. Issue is, not all algos use that variable, or even have internal data, therefore valid calls are not done. Fix this by removing the checks, all driver issues should be resolved. MFC after: 1 week
This commit is contained in:
parent
8dced518a6
commit
f3c0d88e89
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=215289
@ -81,8 +81,6 @@ ieee80211_ratectl_node_deinit(struct ieee80211_node *ni)
|
|||||||
{
|
{
|
||||||
const struct ieee80211vap *vap = ni->ni_vap;
|
const struct ieee80211vap *vap = ni->ni_vap;
|
||||||
|
|
||||||
if (ni->ni_rctls == NULL) /* ratectl not setup */
|
|
||||||
return;
|
|
||||||
vap->iv_rate->ir_node_deinit(ni);
|
vap->iv_rate->ir_node_deinit(ni);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,8 +89,6 @@ ieee80211_ratectl_rate(struct ieee80211_node *ni, void *arg, uint32_t iarg)
|
|||||||
{
|
{
|
||||||
const struct ieee80211vap *vap = ni->ni_vap;
|
const struct ieee80211vap *vap = ni->ni_vap;
|
||||||
|
|
||||||
if (ni->ni_rctls == NULL) /* ratectl not setup */
|
|
||||||
return 0;
|
|
||||||
return vap->iv_rate->ir_rate(ni, arg, iarg);
|
return vap->iv_rate->ir_rate(ni, arg, iarg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,8 +96,6 @@ static void __inline
|
|||||||
ieee80211_ratectl_tx_complete(const struct ieee80211vap *vap,
|
ieee80211_ratectl_tx_complete(const struct ieee80211vap *vap,
|
||||||
const struct ieee80211_node *ni, int status, void *arg1, void *arg2)
|
const struct ieee80211_node *ni, int status, void *arg1, void *arg2)
|
||||||
{
|
{
|
||||||
if (ni->ni_rctls == NULL) /* ratectl not setup */
|
|
||||||
return;
|
|
||||||
vap->iv_rate->ir_tx_complete(vap, ni, status, arg1, arg2);
|
vap->iv_rate->ir_tx_complete(vap, ni, status, arg1, arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,8 +105,6 @@ ieee80211_ratectl_tx_update(const struct ieee80211vap *vap,
|
|||||||
{
|
{
|
||||||
if (vap->iv_rate->ir_tx_update == NULL)
|
if (vap->iv_rate->ir_tx_update == NULL)
|
||||||
return;
|
return;
|
||||||
if (ni->ni_rctls == NULL) /* ratectl not setup */
|
|
||||||
return;
|
|
||||||
vap->iv_rate->ir_tx_update(vap, ni, arg1, arg2, arg3);
|
vap->iv_rate->ir_tx_update(vap, ni, arg1, arg2, arg3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user