mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Refactor WE_SET_AMPDU 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_AMPDU ioctl handling into a separate function. Change-Id: I76c11e2a099c2f9734a0e9b0208b339406b4a22c CRs-Fixed: 2348656
This commit is contained in:
parent
22e57f1269
commit
7c4335001d
1 changed files with 10 additions and 6 deletions
|
|
@ -4448,6 +4448,15 @@ static int hdd_we_set_vht_rate(struct hdd_adapter *adapter, int rate_code)
|
|||
return errno;
|
||||
}
|
||||
|
||||
static int hdd_we_set_ampdu(struct hdd_adapter *adapter, int ampdu)
|
||||
{
|
||||
hdd_debug("AMPDU %d", ampdu);
|
||||
|
||||
return wma_cli_set_command(adapter->session_id,
|
||||
GEN_VDEV_PARAM_AMPDU,
|
||||
ampdu, GEN_CMD);
|
||||
}
|
||||
|
||||
static int hdd_we_set_amsdu(struct hdd_adapter *adapter, int amsdu)
|
||||
{
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
|
|
@ -5217,13 +5226,8 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
break;
|
||||
|
||||
case WE_SET_AMPDU:
|
||||
{
|
||||
hdd_debug("SET AMPDU val %d", set_value);
|
||||
ret = wma_cli_set_command(adapter->session_id,
|
||||
GEN_VDEV_PARAM_AMPDU,
|
||||
set_value, GEN_CMD);
|
||||
ret = hdd_we_set_ampdu(adapter, set_value);
|
||||
break;
|
||||
}
|
||||
|
||||
case WE_SET_AMSDU:
|
||||
ret = hdd_we_set_amsdu(adapter, set_value);
|
||||
|
|
|
|||
Loading…
Reference in a new issue