802.11 wifi reason code

reason code


/* Status codes (IEEE Std 802.11-2016, 9.4.1.9, Table 9-46) */
#define WLAN_STATUS_SUCCESS 0
#define WLAN_STATUS_UNSPECIFIED_FAILURE 1
#define WLAN_STATUS_TDLS_WAKEUP_ALTERNATE 2
#define WLAN_STATUS_TDLS_WAKEUP_REJECT 3
#define WLAN_STATUS_SECURITY_DISABLED 5
#define WLAN_STATUS_UNACCEPTABLE_LIFETIME 6
#define WLAN_STATUS_NOT_IN_SAME_BSS 7
#define WLAN_STATUS_CAPS_UNSUPPORTED 10
#define WLAN_STATUS_REASSOC_NO_ASSOC 11
#define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12
#define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13
#define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14
#define WLAN_STATUS_CHALLENGE_FAIL 15
#define WLAN_STATUS_AUTH_TIMEOUT 16
#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
#define WLAN_STATUS_ASSOC_DENIED_RATES 18
#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
#define WLAN_STATUS_SPEC_MGMT_REQUIRED 22
#define WLAN_STATUS_PWR_CAPABILITY_NOT_VALID 23
#define WLAN_STATUS_SUPPORTED_CHANNEL_NOT_VALID 24
#define WLAN_STATUS_ASSOC_DENIED_NO_SHORT_SLOT_TIME 25
#define WLAN_STATUS_ASSOC_DENIED_NO_HT 27
#define WLAN_STATUS_R0KH_UNREACHABLE 28
#define WLAN_STATUS_ASSOC_DENIED_NO_PCO 29
#define WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY 30
#define WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION 31
#define WLAN_STATUS_UNSPECIFIED_QOS_FAILURE 32
#define WLAN_STATUS_DENIED_INSUFFICIENT_BANDWIDTH 33
#define WLAN_STATUS_DENIED_POOR_CHANNEL_CONDITIONS 34
#define WLAN_STATUS_DENIED_QOS_NOT_SUPPORTED 35
#define WLAN_STATUS_REQUEST_DECLINED 37
#define WLAN_STATUS_INVALID_PARAMETERS 38
#define WLAN_STATUS_REJECTED_WITH_SUGGESTED_CHANGES 39
#define WLAN_STATUS_INVALID_IE 40
#define WLAN_STATUS_GROUP_CIPHER_NOT_VALID 41
#define WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID 42
#define WLAN_STATUS_AKMP_NOT_VALID 43
#define WLAN_STATUS_UNSUPPORTED_RSN_IE_VERSION 44
#define WLAN_STATUS_INVALID_RSN_IE_CAPAB 45
#define WLAN_STATUS_CIPHER_REJECTED_PER_POLICY 46
#define WLAN_STATUS_TS_NOT_CREATED 47
#define WLAN_STATUS_DIRECT_LINK_NOT_ALLOWED 48
#define WLAN_STATUS_DEST_STA_NOT_PRESENT 49
#define WLAN_STATUS_DEST_STA_NOT_QOS_STA 50
#define WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE 51
#define WLAN_STATUS_INVALID_FT_ACTION_FRAME_COUNT 52
#define WLAN_STATUS_INVALID_PMKID 53
#define WLAN_STATUS_INVALID_MDIE 54
#define WLAN_STATUS_INVALID_FTIE 55
#define WLAN_STATUS_REQUESTED_TCLAS_NOT_SUPPORTED 56
#define WLAN_STATUS_INSUFFICIENT_TCLAS_PROCESSING_RESOURCES 57
#define WLAN_STATUS_TRY_ANOTHER_BSS 58
#define WLAN_STATUS_GAS_ADV_PROTO_NOT_SUPPORTED 59
#define WLAN_STATUS_NO_OUTSTANDING_GAS_REQ 60
#define WLAN_STATUS_GAS_RESP_NOT_RECEIVED 61
#define WLAN_STATUS_STA_TIMED_OUT_WAITING_FOR_GAS_RESP 62
#define WLAN_STATUS_GAS_RESP_LARGER_THAN_LIMIT 63
#define WLAN_STATUS_REQ_REFUSED_HOME 64
#define WLAN_STATUS_ADV_SRV_UNREACHABLE 65
#define WLAN_STATUS_REQ_REFUSED_SSPN 67
#define WLAN_STATUS_REQ_REFUSED_UNAUTH_ACCESS 68
#define WLAN_STATUS_INVALID_RSNIE 72
#define WLAN_STATUS_U_APSD_COEX_NOT_SUPPORTED 73
#define WLAN_STATUS_U_APSD_COEX_MODE_NOT_SUPPORTED 74
#define WLAN_STATUS_BAD_INTERVAL_WITH_U_APSD_COEX 75
#define WLAN_STATUS_ANTI_CLOGGING_TOKEN_REQ 76
#define WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED 77
#define WLAN_STATUS_CANNOT_FIND_ALT_TBTT 78
#define WLAN_STATUS_TRANSMISSION_FAILURE 79
#define WLAN_STATUS_REQ_TCLAS_NOT_SUPPORTED 80
#define WLAN_STATUS_TCLAS_RESOURCES_EXCHAUSTED 81
#define WLAN_STATUS_REJECTED_WITH_SUGGESTED_BSS_TRANSITION 82
#define WLAN_STATUS_REJECT_WITH_SCHEDULE 83
#define WLAN_STATUS_REJECT_NO_WAKEUP_SPECIFIED 84
#define WLAN_STATUS_SUCCESS_POWER_SAVE_MODE 85
#define WLAN_STATUS_PENDING_ADMITTING_FST_SESSION 86
#define WLAN_STATUS_PERFORMING_FST_NOW 87
#define WLAN_STATUS_PENDING_GAP_IN_BA_WINDOW 88
#define WLAN_STATUS_REJECT_U_PID_SETTING 89
#define WLAN_STATUS_REFUSED_EXTERNAL_REASON 92
#define WLAN_STATUS_REFUSED_AP_OUT_OF_MEMORY 93
#define WLAN_STATUS_REJECTED_EMERGENCY_SERVICE_NOT_SUPPORTED 94
#define WLAN_STATUS_QUERY_RESP_OUTSTANDING 95
#define WLAN_STATUS_REJECT_DSE_BAND 96
#define WLAN_STATUS_TCLAS_PROCESSING_TERMINATED 97
#define WLAN_STATUS_TS_SCHEDULE_CONFLICT 98
#define WLAN_STATUS_DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL 99
#define WLAN_STATUS_MCCAOP_RESERVATION_CONFLICT 100
#define WLAN_STATUS_MAF_LIMIT_EXCEEDED 101
#define WLAN_STATUS_MCCA_TRACK_LIMIT_EXCEEDED 102
#define WLAN_STATUS_DENIED_DUE_TO_SPECTRUM_MANAGEMENT 103
#define WLAN_STATUS_ASSOC_DENIED_NO_VHT 104
#define WLAN_STATUS_ENABLEMENT_DENIED 105
#define WLAN_STATUS_RESTRICTION_FROM_AUTHORIZED_GDB 106
#define WLAN_STATUS_AUTHORIZATION_DEENABLED 107
#define WLAN_STATUS_FILS_AUTHENTICATION_FAILURE 112
#define WLAN_STATUS_UNKNOWN_AUTHENTICATION_SERVER 113

/* Reason codes (IEEE Std 802.11-2016, 9.4.1.7, Table 9-45) */
#define WLAN_REASON_UNSPECIFIED 1
#define WLAN_REASON_PREV_AUTH_NOT_VALID 2
#define WLAN_REASON_DEAUTH_LEAVING 3
#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
#define WLAN_REASON_DISASSOC_AP_BUSY 5
#define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6
#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
#define WLAN_REASON_PWR_CAPABILITY_NOT_VALID 10
#define WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID 11
#define WLAN_REASON_BSS_TRANSITION_DISASSOC 12
#define WLAN_REASON_INVALID_IE 13
#define WLAN_REASON_MICHAEL_MIC_FAILURE 14
#define WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT 15
#define WLAN_REASON_GROUP_KEY_UPDATE_TIMEOUT 16
#define WLAN_REASON_IE_IN_4WAY_DIFFERS 17
#define WLAN_REASON_GROUP_CIPHER_NOT_VALID 18
#define WLAN_REASON_PAIRWISE_CIPHER_NOT_VALID 19
#define WLAN_REASON_AKMP_NOT_VALID 20
#define WLAN_REASON_UNSUPPORTED_RSN_IE_VERSION 21
#define WLAN_REASON_INVALID_RSN_IE_CAPAB 22
#define WLAN_REASON_IEEE_802_1X_AUTH_FAILED 23
#define WLAN_REASON_CIPHER_SUITE_REJECTED 24
#define WLAN_REASON_TDLS_TEARDOWN_UNREACHABLE 25
#define WLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED 26
#define WLAN_REASON_SSP_REQUESTED_DISASSOC 27
#define WLAN_REASON_NO_SSP_ROAMING_AGREEMENT 28
#define WLAN_REASON_BAD_CIPHER_OR_AKM 29
#define WLAN_REASON_NOT_AUTHORIZED_THIS_LOCATION 30
#define WLAN_REASON_SERVICE_CHANGE_PRECLUDES_TS 31
#define WLAN_REASON_UNSPECIFIED_QOS_REASON 32
#define WLAN_REASON_NOT_ENOUGH_BANDWIDTH 33
#define WLAN_REASON_DISASSOC_LOW_ACK 34
#define WLAN_REASON_EXCEEDED_TXOP 35
#define WLAN_REASON_STA_LEAVING 36
#define WLAN_REASON_END_TS_BA_DLS 37
#define WLAN_REASON_UNKNOWN_TS_BA 38
#define WLAN_REASON_TIMEOUT 39
#define WLAN_REASON_PEERKEY_MISMATCH 45
#define WLAN_REASON_AUTHORIZED_ACCESS_LIMIT_REACHED 46
#define WLAN_REASON_EXTERNAL_SERVICE_REQUIREMENTS 47
#define WLAN_REASON_INVALID_FT_ACTION_FRAME_COUNT 48
#define WLAN_REASON_INVALID_PMKID 49
#define WLAN_REASON_INVALID_MDE 50
#define WLAN_REASON_INVALID_FTE 51
#define WLAN_REASON_MESH_PEERING_CANCELLED 52
#define WLAN_REASON_MESH_MAX_PEERS 53
#define WLAN_REASON_MESH_CONFIG_POLICY_VIOLATION 54
#define WLAN_REASON_MESH_CLOSE_RCVD 55
#define WLAN_REASON_MESH_MAX_RETRIES 56
#define WLAN_REASON_MESH_CONFIRM_TIMEOUT 57
#define WLAN_REASON_MESH_INVALID_GTK 58
#define WLAN_REASON_MESH_INCONSISTENT_PARAMS 59
#define WLAN_REASON_MESH_INVALID_SECURITY_CAP 60
#define WLAN_REASON_MESH_PATH_ERROR_NO_PROXY_INFO 61
#define WLAN_REASON_MESH_PATH_ERROR_NO_FORWARDING_INFO 62
#define WLAN_REASON_MESH_PATH_ERROR_DEST_UNREACHABLE 63
#define WLAN_REASON_MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS 64
#define WLAN_REASON_MESH_CHANNEL_SWITCH_REGULATORY_REQ 65
#define WLAN_REASON_MESH_CHANNEL_SWITCH_UNSPECIFIED 66

可参考:

external\wpa_supplicant_8\src\common\ieee802_11_defs.h

https://blog.csdn.net/baidu_20152423/article/details/89210989

案例分析参考

原因1
.从Log分析来看,这个是由于Dhcp request fail 导致最终disconnect .
Log 分析如下:
16:53:31.659 958 6525 D NetUtils: dhcp_do_request failed : wlan0 (renew)
08-26 16:53:31.659 958 6525 E DhcpStateMachine: DHCPV4 failed on wlan0: Timed out waiting for DHCP Renew to finish
16:53:41.568 4013 4013 D wpa_supplicant: wlan0: Deauthentication notification
16:53:41.568 4013 4013 D wpa_supplicant: Deauthentication frame IE(s) - hexdump(len=0): [NULL]
16:53:41.569 4013 4013 D wpa_supplicant: wlan0: State: COMPLETED -> DISCONNECTED
需厂商更新一个firmware ,用Attach中的firmware 重新测试。


原因2.
看到fail的地方都是在四次握手的时候发生的失败
03-06 18:23:06.585650 1024 1024 D wpa_supplicant: wlan0: State: 4WAY_HANDSHAKE -> DISCONNECTED
03-06 18:23:06.586188 749 1247 D WifiHW : [1] get event: IFNAME=wlan0 <3>WPA: 4-Way Handshake failed - pre-shared key may be incorrect
03-06 18:23:06.586198 749 1247 D WifiHW : [2] get event: IFNAME=wlan0 WPA: 4-Way Handshake failed - pre-shared key may be incorrect
失败应该是客户密码输入错误。如果手机还是一直连上不,可以把手机里的wpa_supplicant.conf文件拉出来,看下servicecenter这个AP的密码是否和预期的一样

原因3
经常reconnect是因为连接的AP信号太弱这时又没有发现有信号更好的AP,导致断线,当此AP信号稍好时又一次scan到此AP,这样才叫reconnect;而roaming是指连接的AP信号太弱这时发现有信号更好的AP,连接到信号更好的AP,这样叫roaming。从log_18_new这份log看到不间断的出现:
请注意:
像12-09 22:43:18.203 922 922 D wpa_supplicant: wlan0: State: ASSOCIATED -> COMPLETED
12-09 23:13:28.204 922 922 D wpa_supplicant: wlan0: State: COMPLETED -> DISCONNECTED
12-09 23:13:28.305 922 922 D wpa_supplicant: wlan0: State: DISCONNECTED -> SCANNING
12-09 23:13:31.015 922 922 D wpa_supplicant: wlan0: State: SCANNING -> ASSOCIATING
12-09 23:13:31.092 922 922 D wpa_supplicant: wlan0: State: ASSOCIATING -> ASSOCIATED
12-09 23:13:31.093 922 922 D wpa_supplicant: wlan0: State: ASSOCIATED -> COMPLETED
这种就是发生了disconnect,然后reconnect成功,而我们在disconnect时间点没有看到其他引起断线的trace,那就说明是firmware上报的断线请求,可以看到:
12-09 20:38:49.199 922 922 D wpa_supplicant: wlan0: Event INTERFACE_STATUS (5) received
12-09 20:38:49.199 922 922 D wpa_supplicant: nl80211: Event message available
12-09 20:38:49.199 922 922 D wpa_supplicant: wlan0: Event DISASSOC (1) received
12-09 20:38:49.199 922 922 D wpa_supplicant: wlan0: Disassociation notification
而firmware上报断线的原因只有一种,就是它认为RSSI太弱了
像12-10 04:37:40.633 922 922 D wpa_supplicant: wlan0: State: ASSOCIATED -> COMPLETED
12-10 05:09:43.609 922 922 D wpa_supplicant: wlan0: State: COMPLETED -> ASSOCIATED
12-10 05:09:43.609 922 922 D wpa_supplicant: wlan0: State: ASSOCIATED -> COMPLETED
这种就是发生了roaming,发生roaming的前提就是发现当前AP信号较弱,同时scan到了信号更好的AP.

原因4:
从log来看是AP要求设备断线的:
09-06 10:48:56.919 <3>[ 1555.321037] (1)[3319:tx_thread][wlan] Rx Deauth frame from BSSID=[aa:63:df:5c:db:c5].
09-06 10:48:56.919 <3>[ 1555.321093] (1)[3319:tx_thread][wlan] Reason code = 7

原因5:
log中看到断线原因如下,是AP更改了security,导致断线
04-20 11:32:37.439 <4>[ 3273.328514]<2> (1)[4122:tx_thread][wlan] rsnCheckSecurityModeChanged: (RSN INFO) security change, WPA2->WEP
04-20 11:32:37.439 <4>[ 3273.328530]<2> (1)[4122:tx_thread][wlan] scanProcessBeaconAndProbeResp: (SCN INFO) Beacon security mode change detected
04-20 11:32:37.439 <4>[ 3273.328544]<2> (1)[4122:tx_thread][wlan] aisFsmStateAbort_NORMAL_TR: (INIT INFO) aisFsmStateAbort_NORMAL_TR
04-20 11:32:37.439 <4>[ 3273.328559]<2> (1)[4122:tx_thread][wlan] aisFsmDisconnect: (INIT INFO) aisFsmDisconnect

有两次断开连接的情况,具体如下
28191 04-09 18:39:16.715 3889 3889 D wpa_supplicant: nl80211: Associated on 2422 MHz
28192 04-09 18:39:16.715 3889 3889 D wpa_supplicant: nl80211: Associated with 10:0e:0e:20:61:15
发送roaming,断开与10:0e:0e:20:61:15的连接,重新连接另一个AP:10:0e:0e:20:5e:7d
33517 04-09 18:39:43.054 3889 3889 D wpa_supplicant: nl80211: Drv Event 47 (NL80211_CMD_ROAM) received for wlan0
33518 04-09 18:39:43.054 3889 3889 D wpa_supplicant: nl80211: Roam event
33519 04-09 18:39:43.054 3889 3889 D wpa_supplicant: nl80211: Associated on 2472 MHz
33520 04-09 18:39:43.054 3889 3889 D wpa_supplicant: nl80211: Associated with 10:0e:0e:20:5e:7d
33521 04-09 18:39:43.054 3889 3889 D wpa_supplicant: nl80211: Operating frequency for the associated BSS from scan results: 2472 MHz
33543 04-09 18:39:43.055 3889 3889 D wpa_supplicant: Operating frequency changed from 2422 to 2472 MHz
33544 04-09 18:39:43.055 3889 3889 D wpa_supplicant: nl80211: Associated on 2472 MHz
33545 04-09 18:39:43.055 3889 3889 D wpa_supplicant: nl80211: Associated with 10:0e:0e:20:5e:7d
33546 04-09 18:39:43.055 3889 3889 D wpa_supplicant: nl80211: Received scan results (1 BSSes)
33549 04-09 18:39:43.055 3889 3889 D wpa_supplicant: wlan0: State: COMPLETED -> ASSOCIATED
上层send disable network command,10:0e:0e:20:5e:7d断开连接
39804 04-09 18:40:07.283 3889 3889 D wpa_supplicant: wlan0: Control interface command 'DISABLE_NETWORK 1'
39805 04-09 18:40:07.283 3889 3889 D wpa_supplicant: CTRL_IFACE: DISABLE_NETWORK id=1
39806 04-09 18:40:07.283 3889 3889 D wpa_supplicant: wlan0: Request to deauthenticate - bssid=10:0e:0e:20:5e:7d pending_bssid=00:00:00:00:00:00 reason=3 state=COMPLETED
39808 04-09 18:40:07.283 3889 3889 D wpa_supplicant: wpa_driver_nl80211_disconnect(reason_code=3)
39817 04-09 18:40:07.298 3889 3889 D wpa_supplicant: wlan0: Event DEAUTH (12) received
39832 04-09 18:40:07.299 3889 3889 D wpa_supplicant: addr=10:0e:0e:20:5e:7d
39833 04-09 18:40:07.299 3889 3889 D wpa_supplicant: wlan0: State: COMPLETED -> DISCONNECTED

log2:
此问题从目前的Log分析来看,是由于这个Ap发了一个Deatuh的 Frame ,导致disconnect ,因此是Ap的行为。重新换Ap测试下。
Log分析如下:
mainlog :
08-24 11:24:15.410 1097 1097 D wpa_supplicant: nl80211: Drv Event 48 (NL80211_CMD_DISCONNECT) received for wlan0
08-24 11:24:15.410 1097 1097 D wpa_supplicant: nl80211: Disconnect event
08-24 11:24:15.410 1097 1097 D wpa_supplicant: wlan0: Event DEAUTH (12) received
08-24 11:24:15.410 1097 1097 D wpa_supplicant: wlan0: Deauthentication notification
08-24 11:24:15.410 1097 1097 D wpa_supplicant: wlan0: * reason 101
08-24 11:24:15.410 1097 1097 D wpa_supplicant: Deauthentication frame IE(s) - hexdump(len=0): [NULL]
08-24 11:24:15.410 1097 1097 I wpa_supplicant: wlan0: CTRL-EVENT-DISCONNECTED bssid=42:0e:0e:20:6a:d2 reason=101
08-24 11:24:15.410 1097 1097 D wpa_supplicant: wlan0: Disconnect event - remove keys
08-24 11:24:15.411 715 1217 D WifiMonitor: Event [IFNAME=wlan0 CTRL-EVENT-DISCONNECTED bssid=42:0e:0e:20:6a:d2 reason=101]
08-24 11:24:15.412 715 1217 E WifiMonitor: WifiMonitor notify network disconnect: null reason=0
08-24 11:24:15.420 1097 1097 D wpa_supplicant: wlan0: State: COMPLETED -> DISCONNECTED
从上面可以看出是由于收到了;discon所以导致断线!
而从kernellog 对应来分析:
08-24 11:24:15.380 <4>[ 8153.620603]<0>-(0)[936:tx_thread][wlan] nicTxReleaseResource: (TX STATE) Release: TC4 count 1, Free=4; TC5 count 0, Free=2
08-24 11:24:15.395 <4>[ 8153.635513]<0> (0)[936:tx_thread][wlan] saaFsmRunEventRxDeauth: (SAA INFO) Rx Deauth frame from BSSID=[42:0e:0e:20:6a:d2].
08-24 11:24:15.395 <4>[ 8153.635553]<0> (0)[936:tx_thread][wlan] saaFsmRunEventRxDeauth: (SAA INFO) Deauth reason = 101
08-24 11:24:15.395 <4>[ 8153.635912]<0> (0)[936:tx_thread][wlan] nicMediaStateChange: (INIT TRACE) DisByMC
08-24 11:24:15.395 <4>[ 8153.635970]<0> (0)[936:tx_thread][wlan] kalIndicateStatusAndComplete: (INIT INFO) [wifi] wlan0 netif_carrier_off 2
08-24 11:24:15.399 <4>[ 8153.639801]<0> (0)[936:tx_thread][wlan] kalIndicateStatusAndComplete: (INIT INFO) [wifi] wlan0 cfg80211_disconnected
08-24 11:24:15.399 <6>[ 8153.639876]<0> (0)[12175:kworker/0:1][mtk_net][sched]dev_deactivate dev = wlan0
08-24 11:24:15.399 <4>[ 8153.640014]<0> (0)[936:tx_thread][wlan] aisFsmSteps: (AIS STATE) [13] TRANSITION: [10] -> [0]
从上面可以看出是:手机收到了Rx Deauth frame from BSSID=[42:0e:0e:20:6a:d2]. 从而导致断线。
因此此问题从上面Log具体来分析是Ap的行为。


原因6:
从kernel log可以看到,wlan driver在数据传输测试中,因为系统memory太低,alloc skb buffer一直失败,482~517一直印出下面的backtrace:
<4>[ 482.458525] (2)[5:kworker/u:0]CPU 1: hi: dump_backtrace+0x0/0 77
<4>[ 482.458539] (3)[2576:tx_thread][] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c)
<4>[ 482.458550] (3)[2576:tx_thread] r6:ddf5c000 r5:00000000 r4:00000020CP3:c0996244 r3:c0996244
<4>[ 482.458577] (2)[5:kworker/u:0]CPU 3: hi: 186, btch: 31 usd: 59
<4>[ 482.458590] (3)[2576:tx_thread][] (dump_stack+0x0/0x1c) from [] (warn_alloc_failed+0xd0/0x114)
<4>[ 482.458611] (3)[2576:tx_thread][] (warn_alloc_failed+0x0/0x114) from [] (__alloc_pages_nodemask+0x3c4/0x828)
<4>[ 482.458627] (2)[5:kworker/u:0]active_anon:22059 inactive_anon:22130 isolated_anon:0
<4>[ 482.458634] (2)[5:kworker/u:0] active_file:11548 inactive_file:31936 isolated_file:0
<4>[ 482.458640] (2)[5:kworker/u:0] unevictable:1190 dirty:14552 writeback:2556 unstable:0
<4>[ 482.458646] (2)[5:kworker/u:0] free:255 slab_reclaimable:4501 slab_unreclaimable:6252
<4>[ 482.458653] (2)[5:kworker/u:0] mapped:5965 shmem:127 pagetables:2348 bounce:0
<4>[ 482.458671] (3)[2576:tx_thread] r3:00000000Normal free:1020kB min:2804kB low:8304kB high:9004kB active_anon:88236kB inactive_anon:88520kB active_file:46192kB inactive_file:127744kB unevictable:4760kB isolated(anon):0kB isolated(file):0kB present:492140kB mlocked:3004kB dirty:58208kB writeback:10224kB mapped:23860kB shmem:508kB slab_reclaimable:18004kB slab_unreclaimable:25008kB kernel_stack:6384kB pagetables:9392kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:61 all_unreclaimable? no
<4>[ 482.458708] (2)[5:kworker/u:0]lowmem_reserve[]: 0 0 0
<4>[ 482.458721] (2)[5:kworker/u:0]Normal: 252:00000000 r2:00000000
<4>[ 482.458735] (3)[2576:tx_thread] r7:c09ad010 r6:00000000 r5:000000300*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 1020kB
<4>[ 482.458774] (2)[5:kworker/u:0]44377 total pagecache pages
<4>[ 482.458782] (2)[5:kworker/u:0]249 pages in swap cache
<4>[ 482.458792] (2)[5:kworker/u:0]Swa:00000000 r4:00000000
<4>[ 482.458804] (2)[5:kworker/u:0]Free swap = 375288kB
<4>[ 482.458816] (3)[2576:tx_thread][] (__alloc_pages_nodemask+0x0/0x828) from [] (new_slab+0x1f0/0x21c)
<4>[ 482.458830] (2)[5:kworker/u:0]Total swap = 393212kB
<4>[ 482.458844] (3)[2576:tx_thread][] (new_slab+0x0/0x21c) from [] (__slab_alloc.isra.51.constprop.55+0x514/0x534)
<4>[ 482.458861] (2)[5:kworker/u:0]SLUB: Unable to allocate memory on node -1 (gfp=0x20)
<4>[ 482.458875] (3)[2576:tx_thread][] (__slab_alloc.isra.51.constprop.55+0x0/0x534) from [] (__kmalloc_track_caller+0x10c/0x160)
<4>[ 482.458899] (3)[2576:tx_thread][] (__kmalloc_track_caller+0x0/0x160) from [] (__alloc_skb+0x58/0xf4)
<4>[ 482.458910] (2)[5:kworker/u:0] cache: kmalloc-2048, object size: 2048, buffer size: 2048, default order: 0, min order: 0
<4>[ 482.458922] (2)[5:kworker/u:0] node 0: slabs: 0, objs: 0, free: 0
<4>[ 482.458946] (3)[2576:tx_thread][] (__alloc_skb+0x0/0xf4) from [] (dev_alloc_skb+0x20/0x44)
<4>[ 482.458973] (3)[2576:tx_thread][] (dev_alloc_skb+0x0/0x44) from [] (kalPacketAlloc+0x18/0x28)
<4>[ 482.459005] (3)[2576:tx_thread]kworker/u:0: page allocation failure: order:0, mode:0x20
<4>[ 482.459014] (2)[5:kworker/u:0]kworker/u:0: page allocation failure: order:0, mode:0x20
<4>[ 482.459023] (2)[5:kworker/u:0]Backtrace:
<4>[ 482.459034] (3)[2576:tx_thread] r4:e226a4c0[] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c)
<4>[ 482.459054] (2)[5:kworker/u:0] r6:ddc32000 r3:000042f0
<4>[ 482.459067] (2)[5:kworker/u:0] r5:00000000[] (nicRxSetupRFB+0x0/0xf4) from [] (wlanReturnPacket+0xc4/0x26c)
<4>[ 482.459087] (3)[2576:tx_thread] r5:000042f0 r4:e226a4c0
<4>[ 482.459101] (2)[5:kworker/u:0] r4:00000020[] (wlanReturnPacket+0x0/0x26c) from [] (kalRxIndicatePkts+0x168/0x298)
<4>[ 482.459120] (3)[2576:tx_thread] r7:d72b0000 r6:e2212b7c r5:dd3602e0 r3:00000000 r4:ce9d9e40
<4>[ 482.459143] (3)[2576:tx_thread]
<4>[ 482.459154] (2)[5:kworker/u:0][] (dump_stack+0x0/0x1c) from [] (warn_alloc_failed+0xd0/0x114)
<4>[ 482.459175] (2)[5:kworker/u:0][] (warn_alloc_failed+0x0/0x114) from [] (__alloc_pages_nodemask+0x3c4/0x828)
<4>[ 482.459191] (3)[2576:tx_thread][] (kalRxIndicatePkts+0x0/0x298) from [] (nicRxProcessRFBs+0x1e8/0x294)
<4>[ 482.459206] (2)[5:kworker/u:0] r3:00000000[] (nicRxProcessRFBs+0x0/0x294) from [] (nicProcessRxInterrupt+0x24/0x5c)
<4>[ 482.459229] (2)[5:kworker/u:0] r2:00000000[] (nicProcessRxInterrupt+0x0/0x5c) from [] (nicProcessIST_impl+0x64/0x1b4)
最后FreeSwRfb在518时耗尽,这个时间点正好是tcpdump显示PC端没有回应的开始:
<4>[ 518.094029] (1)[2576:tx_thread][wlan] qmHandleRxPackets: (QM TRACE) Mark NULL the Packet for less Free Sw Rfb
<4>[ 518.094055] (1)[2576:tx_thread][wlan] qmHandleRxPackets: (QM TRACE) Mark NULL the Packet for less Free Sw Rfb
<4>[ 518.094281] (1)[2576:tx_thread][wlan] qmHandleRxPackets: (QM TRACE) Mark NULL the Packet for less Free Sw Rfb
<4>[ 518.094329] (1)[2576:tx_thread][wlan] qmHandleRxPackets: (QM TRACE) Mark NULL the Packet for less Free Sw Rfb
<4>[ 518.094379] (1)[2576:tx_thread][wlan] qmHandleRxPackets: (QM TRACE) Mark NULL the Packet for less Free Sw Rfb
<4>[ 518.094395] (1)[2576:tx_thread][wlan] qmHandleRxPackets: (QM TRACE) Mark NULL the Packet for less Free Sw Rfb
<4>[ 518.094442] (1)[2576:tx_thread][wlan] qmHandleRxPackets: (QM TRACE) Mark NULL the Packet for less Free Sw Rfb
<4>[ 518.094601] (1)[2576:tx_thread][wlan] qmHandleRxPackets: (QM TRACE) Mark NULL the Packet for less Free Sw Rfb
<4>[ 518.094648] (1)[2576:tx_thread][wlan] qmHandleRxPackets: (QM TRACE) Mark NULL the Packet for less Free Sw Rfb
<4>[ 518.094697] (1)[2576:tx_thread][wlan] qmHandleRxPackets: (QM TRACE) Mark NULL the Packet for less Free Sw Rfb
<4>[ 518.094714] (1)[2576:tx_thread][wlan] qmHandleRxPackets: (QM TRACE) Mark NULL the Packet for less Free Sw Rfb
<4>[ 518.094762] (1)[2576:tx_thread][wlan] qmHandleRxPackets: (QM TRACE) Mark NULL the Packet for less Free Sw Rfb

code 含义

Code 	Reason 	Explanation
0 	Reserved 	Normal working operation
1 	Unspecific Reason 	We don’t know what’s wrong
2 	Previous authentication no longer valid 	Client has associated but is not authorised.
3 	Deauthenticated because sending STA is leaving (or has left) IBSS or ESS 	The access point went offline, deauthenticating the client.
4 	Disassociated due to inactivity 	Client session timeout exceeded.
5 	Disassociated because AP is unable to handle all currently associated STAs 	The access point is busy, performing load balancing, for example.
6 	Class 2 frame received from nonauthenticated STA 	Client attempted to transfer data before it was authenticated.
7 	Class 3 frame received from nonassociated STA 	Client attempted to transfer data before it was associated.
8 	Disassociated because sending STA is leaving (or has left) BSS 	Operating System moved the client to another access point using non-aggressive load balancing.
9 	STA requesting (re)association is not authenticated with responding STA 	Client not authorized yet, still attempting to associate with an access point.
10 	Disassociated because the information in the Power Capability element is unacceptable 	
11 	Disassociated because the information in the Supported Channels element is unacceptable 	
12 	Reserved 	Not Used or Special Purpose
13 	Invalid information element. 	
14 	Message integrity code (MIC) failure 	
15 	4-Way Handshake timeout 	
16 	Group Key Handshake timeout 	
17 	Information element in 4-Way Handshake different from (Re)Association Request/Probe
Response/Beacon frame 	
18 	Invalid group cipher
or
Association denied due to requesting STA not supporting all of the data rates in the BSSBasicRateSet parameter 	*NEW*
The link speed requested by the client or AP is incompatible. (i,e. trying to operate N only speeds on a G AP)
19 	Invalid pairwise cipher 	
20 	Invalid AKMP 	
21 	Unsupported RSN information element version 	
22 	Invalid RSN information element capabilities 	
23 	IEEE 802.1X authentication failed 	
24 	Cipher suite rejected because of the security policy 	
25-31 	Reserved 	Not Used or Special Purpose
32 	Disassociated for unspecified, QoS-related reason 	Quality of Service has denied the action.
33 	Disassociated because QoS AP lacks sufficient bandwidth for this QoS STA 	
34 	Disassociated because excessive number of frames need to be acknowledged, but are not
acknowledged due to AP transmissions and/or poor channel conditions 	
35 	Disassociated because STA is transmitting outside the limits of its TXOPs 	
36 	Requested from peer STA as the STA is leaving the BSS (or resetting) 	
37 	Requested from peer STA as it does not want to use the mechanism 	
38 	Requested from peer STA as the STA received frames using the mechanism for which a
setup is required 	
39 	Requested from peer STA due to timeout 	
45 	Peer STA does not support the requested cipher suite 	
45-65 	Reserved 	Not Used or Special Purpose
99 		Typically “No Reason Code” / Unknown State
535 	Reserved 	Not Used or Special Purpose

The first few reason codes where helpful while debugging my wifi related issues.

你可能感兴趣的:(Android,零碎知识记录)