Commit 5143f7a3 authored by Ioan-Adrian Ratiu's avatar Ioan-Adrian Ratiu Committed by Greg Kroah-Hartman

staging: rtl8192e: rtllib: fix macro style issue

Remove macro and use explicit case statements. Code is a little
longer but clearer. Checkpatch.pl does not complain anymore.
Signed-off-by: default avatarIoan-Adrian Ratiu <adi@adirat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ed2c2e06
...@@ -1744,37 +1744,61 @@ static int rtllib_parse_qos_info_param_IE(struct rtllib_device *ieee, ...@@ -1744,37 +1744,61 @@ static int rtllib_parse_qos_info_param_IE(struct rtllib_device *ieee,
return rc; return rc;
} }
#define MFIE_STRING(x) case MFIE_TYPE_ ##x: return #x
static const char *get_info_element_string(u16 id) static const char *get_info_element_string(u16 id)
{ {
switch (id) { switch (id) {
MFIE_STRING(SSID); case MFIE_TYPE_SSID:
MFIE_STRING(RATES); return "SSID";
MFIE_STRING(FH_SET); case MFIE_TYPE_RATES:
MFIE_STRING(DS_SET); return "RATES";
MFIE_STRING(CF_SET); case MFIE_TYPE_FH_SET:
MFIE_STRING(TIM); return "FH_SET";
MFIE_STRING(IBSS_SET); case MFIE_TYPE_DS_SET:
MFIE_STRING(COUNTRY); return "DS_SET";
MFIE_STRING(HOP_PARAMS); case MFIE_TYPE_CF_SET:
MFIE_STRING(HOP_TABLE); return "CF_SET";
MFIE_STRING(REQUEST); case MFIE_TYPE_TIM:
MFIE_STRING(CHALLENGE); return "TIM";
MFIE_STRING(POWER_CONSTRAINT); case MFIE_TYPE_IBSS_SET:
MFIE_STRING(POWER_CAPABILITY); return "IBSS_SET";
MFIE_STRING(TPC_REQUEST); case MFIE_TYPE_COUNTRY:
MFIE_STRING(TPC_REPORT); return "COUNTRY";
MFIE_STRING(SUPP_CHANNELS); case MFIE_TYPE_HOP_PARAMS:
MFIE_STRING(CSA); return "HOP_PARAMS";
MFIE_STRING(MEASURE_REQUEST); case MFIE_TYPE_HOP_TABLE:
MFIE_STRING(MEASURE_REPORT); return "HOP_TABLE";
MFIE_STRING(QUIET); case MFIE_TYPE_REQUEST:
MFIE_STRING(IBSS_DFS); return "REQUEST";
MFIE_STRING(RSN); case MFIE_TYPE_CHALLENGE:
MFIE_STRING(RATES_EX); return "CHALLENGE";
MFIE_STRING(GENERIC); case MFIE_TYPE_POWER_CONSTRAINT:
MFIE_STRING(QOS_PARAMETER); return "POWER_CONSTRAINT";
case MFIE_TYPE_POWER_CAPABILITY:
return "POWER_CAPABILITY";
case MFIE_TYPE_TPC_REQUEST:
return "TPC_REQUEST";
case MFIE_TYPE_TPC_REPORT:
return "TPC_REPORT";
case MFIE_TYPE_SUPP_CHANNELS:
return "SUPP_CHANNELS";
case MFIE_TYPE_CSA:
return "CSA";
case MFIE_TYPE_MEASURE_REQUEST:
return "MEASURE_REQUEST";
case MFIE_TYPE_MEASURE_REPORT:
return "MEASURE_REPORT";
case MFIE_TYPE_QUIET:
return "QUIET";
case MFIE_TYPE_IBSS_DFS:
return "IBSS_DFS";
case MFIE_TYPE_RSN:
return "RSN";
case MFIE_TYPE_RATES_EX:
return "RATES_EX";
case MFIE_TYPE_GENERIC:
return "GENERIC";
case MFIE_TYPE_QOS_PARAMETER:
return "QOS_PARAMETER";
default: default:
return "UNKNOWN"; return "UNKNOWN";
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment