mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Change hdd_we_set_11d_state() signature
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 update hdd_we_set_11d_state() to conform with a consistent int()(adapter, value) signature. Change-Id: I96a7424630ffc9fd3a8713d980fe6efad4a7be05 CRs-Fixed: 2350071
This commit is contained in:
parent
b43ec12eb5
commit
deab857b1b
1 changed files with 3 additions and 4 deletions
|
|
@ -4075,8 +4075,9 @@ free_config:
|
|||
return errno;
|
||||
}
|
||||
|
||||
static int hdd_we_set_11d_state(struct hdd_context *hdd_ctx, int state_11d)
|
||||
static int hdd_we_set_11d_state(struct hdd_adapter *adapter, int state_11d)
|
||||
{
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
tSmeConfigParams *sme_config;
|
||||
bool enable_11d;
|
||||
mac_handle_t mac_handle = hdd_ctx->mac_handle;
|
||||
|
|
@ -5173,7 +5174,6 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
mac_handle_t mac_handle;
|
||||
struct hdd_context *hdd_ctx;
|
||||
int *value = (int *)extra;
|
||||
int sub_cmd = value[0];
|
||||
|
|
@ -5191,10 +5191,9 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
mac_handle = hdd_ctx->mac_handle;
|
||||
switch (sub_cmd) {
|
||||
case WE_SET_11D_STATE:
|
||||
ret = hdd_we_set_11d_state(hdd_ctx, set_value);
|
||||
ret = hdd_we_set_11d_state(adapter, set_value);
|
||||
break;
|
||||
|
||||
case WE_SET_POWER:
|
||||
|
|
|
|||
Loading…
Reference in a new issue