mirror of https://gitee.com/openkylin/linux.git
brcmfmac: print name of connect status event
This simplifies debugging. Format %s (%u) comes from similar debugging message in brcmf_fweh_event_worker. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
77364aae88
commit
e1c122d55f
|
@ -5506,7 +5506,8 @@ brcmf_notify_connect_status_ap(struct brcmf_cfg80211_info *cfg,
|
||||||
u32 reason = e->reason;
|
u32 reason = e->reason;
|
||||||
struct station_info sinfo;
|
struct station_info sinfo;
|
||||||
|
|
||||||
brcmf_dbg(CONN, "event %d, reason %d\n", event, reason);
|
brcmf_dbg(CONN, "event %s (%u), reason %d\n",
|
||||||
|
brcmf_fweh_event_name(event), event, reason);
|
||||||
if (event == BRCMF_E_LINK && reason == BRCMF_E_REASON_LINK_BSSCFG_DIS &&
|
if (event == BRCMF_E_LINK && reason == BRCMF_E_REASON_LINK_BSSCFG_DIS &&
|
||||||
ndev != cfg_to_ndev(cfg)) {
|
ndev != cfg_to_ndev(cfg)) {
|
||||||
brcmf_dbg(CONN, "AP mode link down\n");
|
brcmf_dbg(CONN, "AP mode link down\n");
|
||||||
|
|
|
@ -69,7 +69,7 @@ static struct brcmf_fweh_event_name fweh_event_names[] = {
|
||||||
*
|
*
|
||||||
* @code: code to lookup.
|
* @code: code to lookup.
|
||||||
*/
|
*/
|
||||||
static const char *brcmf_fweh_event_name(enum brcmf_fweh_event_code code)
|
const char *brcmf_fweh_event_name(enum brcmf_fweh_event_code code)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < ARRAY_SIZE(fweh_event_names); i++) {
|
for (i = 0; i < ARRAY_SIZE(fweh_event_names); i++) {
|
||||||
|
@ -79,7 +79,7 @@ static const char *brcmf_fweh_event_name(enum brcmf_fweh_event_code code)
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static const char *brcmf_fweh_event_name(enum brcmf_fweh_event_code code)
|
const char *brcmf_fweh_event_name(enum brcmf_fweh_event_code code)
|
||||||
{
|
{
|
||||||
return "nodebug";
|
return "nodebug";
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,6 +287,8 @@ struct brcmf_fweh_info {
|
||||||
void *data);
|
void *data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const char *brcmf_fweh_event_name(enum brcmf_fweh_event_code code);
|
||||||
|
|
||||||
void brcmf_fweh_attach(struct brcmf_pub *drvr);
|
void brcmf_fweh_attach(struct brcmf_pub *drvr);
|
||||||
void brcmf_fweh_detach(struct brcmf_pub *drvr);
|
void brcmf_fweh_detach(struct brcmf_pub *drvr);
|
||||||
int brcmf_fweh_register(struct brcmf_pub *drvr, enum brcmf_fweh_event_code code,
|
int brcmf_fweh_register(struct brcmf_pub *drvr, enum brcmf_fweh_event_code code,
|
||||||
|
|
Loading…
Reference in New Issue