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: Ioan-Adrian Ratiu <adi@adirat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ioan-Adrian Ratiu 2015-07-23 16:24:10 +03:00 коммит произвёл Greg Kroah-Hartman
Родитель ed2c2e060b
Коммит 5143f7a3e9
1 изменённых файлов: 52 добавлений и 28 удалений

Просмотреть файл

@ -1744,37 +1744,61 @@ static int rtllib_parse_qos_info_param_IE(struct rtllib_device *ieee,
return rc;
}
#define MFIE_STRING(x) case MFIE_TYPE_ ##x: return #x
static const char *get_info_element_string(u16 id)
{
switch (id) {
MFIE_STRING(SSID);
MFIE_STRING(RATES);
MFIE_STRING(FH_SET);
MFIE_STRING(DS_SET);
MFIE_STRING(CF_SET);
MFIE_STRING(TIM);
MFIE_STRING(IBSS_SET);
MFIE_STRING(COUNTRY);
MFIE_STRING(HOP_PARAMS);
MFIE_STRING(HOP_TABLE);
MFIE_STRING(REQUEST);
MFIE_STRING(CHALLENGE);
MFIE_STRING(POWER_CONSTRAINT);
MFIE_STRING(POWER_CAPABILITY);
MFIE_STRING(TPC_REQUEST);
MFIE_STRING(TPC_REPORT);
MFIE_STRING(SUPP_CHANNELS);
MFIE_STRING(CSA);
MFIE_STRING(MEASURE_REQUEST);
MFIE_STRING(MEASURE_REPORT);
MFIE_STRING(QUIET);
MFIE_STRING(IBSS_DFS);
MFIE_STRING(RSN);
MFIE_STRING(RATES_EX);
MFIE_STRING(GENERIC);
MFIE_STRING(QOS_PARAMETER);
case MFIE_TYPE_SSID:
return "SSID";
case MFIE_TYPE_RATES:
return "RATES";
case MFIE_TYPE_FH_SET:
return "FH_SET";
case MFIE_TYPE_DS_SET:
return "DS_SET";
case MFIE_TYPE_CF_SET:
return "CF_SET";
case MFIE_TYPE_TIM:
return "TIM";
case MFIE_TYPE_IBSS_SET:
return "IBSS_SET";
case MFIE_TYPE_COUNTRY:
return "COUNTRY";
case MFIE_TYPE_HOP_PARAMS:
return "HOP_PARAMS";
case MFIE_TYPE_HOP_TABLE:
return "HOP_TABLE";
case MFIE_TYPE_REQUEST:
return "REQUEST";
case MFIE_TYPE_CHALLENGE:
return "CHALLENGE";
case MFIE_TYPE_POWER_CONSTRAINT:
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:
return "UNKNOWN";
}