Made ieee80211_ratectl_tx_complete and ieee80211_ratectl_rate functions no op instead of not calling these functions in each wlan driver.

This should be iso functionality.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41375 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2011-05-08 07:46:25 +00:00
parent 192781dd49
commit fae2ac4671
6 changed files with 6 additions and 26 deletions
@@ -2982,9 +2982,7 @@ bwi_encap(struct bwi_softc *sc, int idx, struct mbuf *m,
} else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) {
rate = rate_fb = tp->ucastrate;
} else {
#ifndef __HAIKU__
rix = ieee80211_ratectl_rate(ni, NULL, pkt_len);
#endif
rate = ni->ni_txrate;
if (rix > 0) {
@@ -3380,11 +3378,9 @@ _bwi_txeof(struct bwi_softc *sc, uint16_t tx_id, int acked, int data_txcnt)
* well so to avoid over-aggressive downshifting we
* treat any number of retries as "1".
*/
#ifndef __HAIKU__
ieee80211_ratectl_tx_complete(vap, ni,
(data_txcnt > 1) ? IEEE80211_RATECTL_TX_SUCCESS :
IEEE80211_RATECTL_TX_FAILURE, &acked, NULL);
#endif
}
/*
@@ -1600,10 +1600,8 @@ wpi_tx_intr(struct wpi_softc *sc, struct wpi_rx_desc *desc)
DPRINTFN(WPI_DEBUG_TX, ("%d retries\n", stat->ntries));
retrycnt = 1;
}
#ifndef __HAIKU__
ieee80211_ratectl_tx_complete(vap, ni, IEEE80211_RATECTL_TX_SUCCESS,
&retrycnt, NULL);
#endif
/* XXX oerrors should only count errors !maxtries */
if ((le32toh(stat->status) & 0xff) != 1)
@@ -1949,9 +1947,7 @@ wpi_tx_data(struct wpi_softc *sc, struct mbuf *m0, struct ieee80211_node *ni,
} else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) {
rate = tp->ucastrate;
} else {
#ifndef __HAIKU__
(void) ieee80211_ratectl_rate(ni, NULL, 0);
#endif
rate = ni->ni_txrate;
}
tx->rate = wpi_plcp_signal(rate);
@@ -2357,13 +2357,11 @@ iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, int ackfailcnt,
*/
if (status & 0x80) {
ifp->if_oerrors++;
#ifndef __HAIKU__
ieee80211_ratectl_tx_complete(vap, ni,
IEEE80211_RATECTL_TX_FAILURE, &ackfailcnt, NULL);
} else {
ieee80211_ratectl_tx_complete(vap, ni,
IEEE80211_RATECTL_TX_SUCCESS, &ackfailcnt, NULL);
#endif
}
m_freem(m);
ieee80211_free_node(ni);
@@ -2888,10 +2886,8 @@ iwn_tx_data(struct iwn_softc *sc, struct mbuf *m, struct ieee80211_node *ni,
else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE)
rate = tp->ucastrate;
else {
#ifndef __HAIKU__
/* XXX pass pktlen */
(void) ieee80211_ratectl_rate(ni, NULL, 0);
#endif
rate = ni->ni_txrate;
}
ridx = iwn_plcp_signal(rate);
@@ -953,12 +953,10 @@ rt2560_tx_intr(struct rt2560_softc *sc)
retrycnt = 0;
DPRINTFN(sc, 10, "%s\n", "data frame sent successfully");
#ifndef __HAIKU__
if (data->rix != IEEE80211_FIXED_RATE_NONE)
ieee80211_ratectl_tx_complete(vap, ni,
IEEE80211_RATECTL_TX_SUCCESS,
&retrycnt, NULL);
#endif
ifp->if_opackets++;
break;
@@ -967,12 +965,10 @@ rt2560_tx_intr(struct rt2560_softc *sc)
DPRINTFN(sc, 9, "data frame sent after %u retries\n",
retrycnt);
#ifndef __HAIKU__
if (data->rix != IEEE80211_FIXED_RATE_NONE)
ieee80211_ratectl_tx_complete(vap, ni,
IEEE80211_RATECTL_TX_SUCCESS,
&retrycnt, NULL);
#endif
ifp->if_opackets++;
break;
@@ -981,12 +977,10 @@ rt2560_tx_intr(struct rt2560_softc *sc)
DPRINTFN(sc, 9, "data frame failed after %d retries\n",
retrycnt);
#ifndef __HAIKU__
if (data->rix != IEEE80211_FIXED_RATE_NONE)
ieee80211_ratectl_tx_complete(vap, ni,
IEEE80211_RATECTL_TX_FAILURE,
&retrycnt, NULL);
#endif
ifp->if_oerrors++;
break;
@@ -1806,9 +1800,7 @@ rt2560_tx_data(struct rt2560_softc *sc, struct mbuf *m0,
} else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) {
rate = tp->ucastrate;
} else {
#ifndef __HAIKU__
(void) ieee80211_ratectl_rate(ni, NULL, 0);
#endif
rate = ni->ni_txrate;
}
@@ -904,12 +904,10 @@ rt2661_tx_intr(struct rt2661_softc *sc)
DPRINTFN(sc, 10, "data frame sent successfully after "
"%d retries\n", retrycnt);
#ifndef __HAIKU__
if (data->rix != IEEE80211_FIXED_RATE_NONE)
ieee80211_ratectl_tx_complete(vap, ni,
IEEE80211_RATECTL_TX_SUCCESS,
&retrycnt, NULL);
#endif
ifp->if_opackets++;
break;
@@ -918,12 +916,10 @@ rt2661_tx_intr(struct rt2661_softc *sc)
DPRINTFN(sc, 9, "%s\n",
"sending data frame failed (too much retries)");
#ifndef __HAIKU__
if (data->rix != IEEE80211_FIXED_RATE_NONE)
ieee80211_ratectl_tx_complete(vap, ni,
IEEE80211_RATECTL_TX_FAILURE,
&retrycnt, NULL);
#endif
ifp->if_oerrors++;
break;
@@ -1489,9 +1485,7 @@ rt2661_tx_data(struct rt2661_softc *sc, struct mbuf *m0,
} else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) {
rate = tp->ucastrate;
} else {
#ifndef __HAIKU__
(void) ieee80211_ratectl_rate(ni, NULL, 0);
#endif
rate = ni->ni_txrate;
}
rate &= IEEE80211_RATE_VAL;
@@ -101,14 +101,20 @@ ieee80211_ratectl_rate(struct ieee80211_node *ni, void *arg, uint32_t iarg)
{
const struct ieee80211vap *vap = ni->ni_vap;
#ifndef __HAIKU__
return vap->iv_rate->ir_rate(ni, arg, iarg);
#else
return 0;
#endif
}
static void __inline
ieee80211_ratectl_tx_complete(const struct ieee80211vap *vap,
const struct ieee80211_node *ni, int status, void *arg1, void *arg2)
{
#ifndef __HAIKU__
vap->iv_rate->ir_tx_complete(vap, ni, status, arg1, arg2);
#endif
}
static void __inline