mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
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:
parent
d3f1efd8fa
commit
74696bbda0
1 changed files with 6 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue