qcacld-3.0: Refactor WE_SET_11AX_RATE ioctl processing

One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_SET_11AX_RATE ioctl handling into a separate
function with a consistent int()(adapter, value) signature.

Change-Id: Iaaba30073d59f96faddcb9f9baaabc60b8e58ee5
CRs-Fixed: 2350070
This commit is contained in:
Jeff Johnson 2018-11-13 13:30:36 -08:00 • committed by nshrivas
commit 74696bbda0

View file

@ -5134,6 +5134,11 @@ static int hdd_we_set_conc_system_pref(struct hdd_adapter *adapter,
return 0;
}
static int hdd_we_set_11ax_rate(struct hdd_adapter *adapter, int rate)
{
return hdd_set_11ax_rate(adapter, rate, NULL);
}
/**
* iw_setint_getnone() - Generic "set integer" private ioctl handler
* @dev: device upon which the ioctl was received
@ -5506,7 +5511,7 @@ static int __iw_setint_getnone(struct net_device *dev,
break;
case WE_SET_11AX_RATE:
ret = hdd_set_11ax_rate(adapter, set_value, NULL);
ret = hdd_we_set_11ax_rate(adapter, set_value);
break;
case WE_SET_DCM: