Lines Matching defs:amn
923 rn->amn.amn_txcnt++;
925 rn->amn.amn_retrycnt++;
932 rn->amn.amn_txcnt++;
933 rn->amn.amn_retrycnt++;
1652 struct rt2661_amrr_node *amn)
1654 amn->amn_success = 0;
1655 amn->amn_recovery = 0;
1656 amn->amn_txcnt = amn->amn_retrycnt = 0;
1657 amn->amn_success_threshold = amrr->amrr_min_success_threshold;
1662 struct rt2661_amrr_node *amn)
1665 #define is_success(amn) \
1666 ((amn)->amn_retrycnt < (amn)->amn_txcnt / 10)
1667 #define is_failure(amn) \
1668 ((amn)->amn_retrycnt > (amn)->amn_txcnt / 3)
1669 #define is_enough(amn) \
1670 ((amn)->amn_txcnt > 10)
1679 #define reset_cnt(amn) \
1680 { (amn)->amn_txcnt = (amn)->amn_retrycnt = 0; }
1684 if (is_success(amn) && is_enough(amn)) {
1685 amn->amn_success++;
1686 if (amn->amn_success >= amn->amn_success_threshold &&
1688 amn->amn_recovery = 1;
1689 amn->amn_success = 0;
1694 amn->amn_txcnt, amn->amn_retrycnt);
1697 amn->amn_recovery = 0;
1698 } else if (is_failure(amn)) {
1699 amn->amn_success = 0;
1701 if (amn->amn_recovery) {
1702 amn->amn_success_threshold *= 2;
1703 if (amn->amn_success_threshold >
1705 amn->amn_success_threshold =
1708 amn->amn_success_threshold =
1715 amn->amn_txcnt, amn->amn_retrycnt);
1718 amn->amn_recovery = 0;
1721 if (is_enough(amn) || need_change)
1722 reset_cnt(amn);
1882 rt2661_amrr_node_init(&sc->amrr, &((struct rt2661_node *)ni)->amn);
1898 rt2661_amrr_choose(&sc->amrr, ni, &rn->amn);