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