qcacmn: Resolve coverity issues for operational rate config implementation
Resolve the 'modulo by 0' coverity issue for the implementation for manual configuration of mcs via "tr069_set_oprate" command. Change-Id: Iccb29ed0aede59929267dd22e580609c7c853577 CRs-Fixed: 3625355
This commit is contained in:

committed by
Rahul Choudhary

parent
8ccae22749
commit
f9b6804db1
@@ -7001,7 +7001,7 @@ qdf_export_symbol(dp_get_supported_rates);
|
||||
*/
|
||||
int dp_get_kbps_to_mcs(int kbps_rate, int shortgi, int htflag)
|
||||
{
|
||||
int i = 0, nss = 0, num_mcs = 0;
|
||||
int i = 0, nss = 0, num_mcs = NUM_LEGACY_MCS;
|
||||
int start_index = -1, end_index = -1;
|
||||
int ratekbpssgi = 0, ratekbps = 0;
|
||||
|
||||
@@ -7144,7 +7144,7 @@ int dp_get_kbps_to_mcs(int kbps_rate, int shortgi, int htflag)
|
||||
int dp_get_kbps_to_mcs(int kbps_rate, int shortgi, int htflag,
|
||||
int nss, int ch_width);
|
||||
{
|
||||
int i = 0, num_mcs = 0;
|
||||
int i = 0, num_mcs = NUM_LEGACY_MCS;
|
||||
int start_index = -1, end_index = -1;
|
||||
int ratekbpssgi = 0, ratekbps = 0;
|
||||
|
||||
|
@@ -170,6 +170,7 @@ static inline int dp_ath_rate_out(uint64_t _i)
|
||||
#endif
|
||||
|
||||
#define INVALID_RATE_ERR -1
|
||||
#define NUM_LEGACY_MCS 1
|
||||
|
||||
/*
|
||||
* The order of the rate types are jumbled below since the current code
|
||||
|
Reference in New Issue
Block a user