pdch: has_gprs_only_tb_attached: use m_num_tbfs
Make use of the separate GPRS counters added in previous patch I0c0a1121b4ae5f031782e7e63a0c28eb0b6c8b42 to shorten has_gprs_only_tb_attached. Related: SYS#4878 Change-Id: I1dd7df2c740ea604f07c65bebcb7c0051aebf9ae
This commit is contained in:
parent
eeae776345
commit
fce67bc7fa
14
src/pdch.cpp
14
src/pdch.cpp
|
@ -1114,18 +1114,8 @@ void gprs_rlcmac_pdch::detach_tbf(gprs_rlcmac_tbf *tbf)
|
||||||
|
|
||||||
bool gprs_rlcmac_pdch::has_gprs_only_tbf_attached() const
|
bool gprs_rlcmac_pdch::has_gprs_only_tbf_attached() const
|
||||||
{
|
{
|
||||||
unsigned int i;
|
return (m_num_tbfs_gprs[GPRS_RLCMAC_UL_TBF] +
|
||||||
unsigned int j;
|
m_num_tbfs_gprs[GPRS_RLCMAC_DL_TBF]) > 0;
|
||||||
for (i = 0; i < sizeof(m_assigned_tfi[0]); i++) {
|
|
||||||
for (j = 0; j < 2; j++) {
|
|
||||||
if (m_assigned_tfi[j] & (1UL << i)) {
|
|
||||||
gprs_rlcmac_tbf *tbf = m_tbfs[j][i];
|
|
||||||
if (!tbf->is_egprs_enabled())
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void gprs_rlcmac_pdch::reserve(enum gprs_rlcmac_tbf_direction dir)
|
void gprs_rlcmac_pdch::reserve(enum gprs_rlcmac_tbf_direction dir)
|
||||||
|
|
Loading…
Reference in New Issue