Commit Graph

112 Commits

Author SHA1 Message Date
Poddar, Siddarth
21e7bf0a3a qcacld-3.0: Move NULL check before dereferencing pdev
Move NULL check before dereferencing pdev in ol_tx_create_flow_pool

Change-Id: I42398c9473690a0a8f70f35cc7d5aac87c4ec7e7
CRs-fixed: 1034748
2016-07-11 04:59:47 -07:00
Govind Singh
8c46db9759 qcacld-3.0: Correct fw common references in dp layer
FW common files needs to be in sync with host and fw.
Correct fw common references in dp layer with latest copy
of fw common files.

Change-Id: I194c25045ca978634027a94bc74f22253b1afc86
CRs-Fixed: 1012542
2016-07-08 06:12:06 -07:00
Himanshu Agarwal
879a3bec5c qcacld-3.0: Add NULL checks before dereferencing
Add NULL checks before dereferencing in:
1) BMI layer
2) HTT layer
3) EPPING layer.

Change-Id: I9998d4aeb983dc101121a71d791d7ec626e3f5d4
CRs-Fixed: 1036390
2016-07-06 13:30:39 -07:00
Nirav Shah
bf1b033062 qcacld-3.0: Add per CPU interrupt statistics
Add per CPU per copy engine interrupt statistics.

Change-Id: I397733ca9c46274f9b5c0026f032e3345100a98d
CRs-Fixed: 1017437
2016-06-30 14:49:30 +05:30
Leo Chang
cc923e2771 qcacld-3.0: IPA WDI TX buffer allocation on coherent memory
IPA WDI TX buffer should be used by IPA HW/WLAN FWHW during
WLAN activated. This memory is not used by HLOS. Then
coherent memory allocation is better for usage.

Change-Id: Icc96c54aca9fc986c231ac3173f54cf7c7f253aa
CRs-fixed: 1019762
2016-06-29 21:53:13 -07:00
Nirav Shah
da008344a6 qcacld-3.0: Enhance data path related statistics
Enhance data path related statistics
- Add per reason pause time
- Enahnce TSO stats
- clear DPTRACE buffer

Change-Id: Ia59fa5ba326504eb54e14d44f42a335c6b835ee4
CRs-Fixed: 1017437
2016-06-24 14:30:49 -07:00
Siddarth Poddar
b2011f6435 qcacld-3.0: Add txrx apis for High Latency systems (Part 2 - HL Datapath)
Add tx schedular module, tx classify module within the data SW,
tx frame queues logging,  group credit support and
send-recieve tx frames instance for HL system.

CRs-Fixed: 975526
Change-Id: If1655d4d832f88e565ab946ef9e9719f256ab7b1
2016-06-23 12:27:50 -07:00
Siddarth Poddar
1df1cd85b4 qcacld-3.0: Add htt apis for High Latency systems (Part 1 - HL Datapath)
Add support for HTT instance creation, initialization and
deletion, Host -> Target and Target -> Host HTT messages
exchange, receive and transmit aspects of HTT.

CRs-Fixed: 975526
Change-Id: Ie66a83b6efe216df192b033c9d137a93fdce688f
2016-06-23 12:27:43 -07:00
Nirav Shah
2e583a0344 qcacld-3.0: Datapath changes for WiSA specification
Datapath changes for WiSA specification.
- Multicast packets with 50000 as destination
  port should go at 6Mbps.
- Multicast packets with 50001 as destination
  port should go at 24Mbps.

Change-Id: Ic219f58f3e8b2f6863a275928429153defe63b5a
CRs-Fixed: 1010412
2016-06-14 14:28:44 -07:00
Nirav Shah
1da7768385 qcacld-3.0: Remove PROTO_TRACE feature
Remove PROTO_TRACE feature and add MGMT packet
logging in DPTRACE.

Change-Id: I9bc019bb03e703cb8044cb5d4290fd438b1c3e69
CRs-Fixed: 1008087
2016-06-14 14:28:41 -07:00
Nirav Shah
0d58a7ef5f qcacld-3.0: Enhance DPTRACE to support RX path
Enhance DPTRACE to support RX path and
add support for live mode.
Live mode will print info in kmsg and
log it in buffer as well.
To enable live mode use below command.
iwpriv wlan0 dump_dp_trace 1 0

Change-Id: Id309a4d75cec93654b4acac51e5be42eae7f0b35
CRs-Fixed: 1008087
2016-06-14 14:28:38 -07:00
Himanshu Agarwal
a6cedee349 qcacld-3.0: Change unsigned long to uint64_t
Change unsigned long to uint64_t while updating intra bss forwarded
packets count to make sure that the assignment is compatible for all
architectures.

Change-Id: I6bc0e2d7524c117ce199b4a373f541fd06fc9ef8
CRs-Fixed: 996735
2016-06-14 14:28:06 -07:00
Manjunathappa Prakash
c8e756412e qcacld-3.0: Enable DEBUG_Rx_RING_BUFFER to keep track of posted buffers
This enables the tracking of posted rx ring buffers. With this we can
identify if host/fw is wrong when we hit below issue:
"wlan: [0:E :QDF] rx hash: htt_rx_hash_list_lookup: no entry found for"
<physical address>

Change-Id: Ib973a2e2a69e881beddea23cdc1d2d994eeb1e12
CRs-Fixed: 864569
2016-06-14 14:28:02 -07:00
Manjunathappa Prakash
92db771024 qcacld-3.0: Do not modify vdev Rx callback in peer (de)init functions
Do not reset vdev->rx callback in peer modification functions, same vdev
corresponds to multiple peer.
Without this TDLS handshake fails, vdev->rx null callback function
results in dropping of datapath packets.

Change-Id: I39b51d2596cde494bee888009583a42f12a3f068
CRs-Fixed: 1024298
2016-06-14 14:27:59 -07:00
Poddar, Siddarth
27b1a60e64 qcacld-3.0: Add datapath layer changes for sdio bus (Part 4 - HIF SDIO)
Remove bus specific calls from data path layer.
Add sdio specific target address
Add sdio bundling rates in datapath layer.
Fix rx data callback for UMP system.

CRs-Fixed: 969334
Change-Id: I0cd45479ca89b97455b4a9c71ce326646f38a5f3
2016-06-14 14:27:53 -07:00
Dhanashri Atre
5166d573eb qcacld-3.0: Higher 32 bits in the dma address are ignored
In TSO the higher bits in the 64 bit dma address are being ignored.
This is resulting in an incorrect address being programmed in the
fragment descriptor.

Change-Id: Id015e81212d2ded3f0716ca5cc06ae2220952270
CRs-Fixed: 1024169
2016-06-09 22:10:03 -07:00
Himanshu Agarwal
5ac2f7bef9 qcacld-3.0: Refactor intra bss forwarded packets count
Propagation from qcacld-2.0 to qcacld-3.0.

Initially, when a packet is forwarded from txrx layer, it is added in
count only once although the count should increase by 2 as there is one
rx packet and one tx packet that is not getting considered in the hdd
packet count.

Add code to ensure that when packet is forwarded from lower layers,
it get considered accurately in the packet count.

Change-Id: I47bc1e0ecfa2e831438534cf34d37086a306b4e9
CRs-Fixed: 996735
2016-06-06 18:45:27 -07:00
Himanshu Agarwal
8c66df3699 qcacld-3.0: Remove error print from kmsg
Propagation from qcacld-2.0 to qcacld-3.0.

Remove error print from kmsg as this print is unnecessary and
may flood the kmsg.

Change-Id: I0978f88af6677cb0c1e1db5eae7e5d6a69bd4b70
CRs-Fixed: 997243
2016-06-06 18:45:25 -07:00
Himanshu Agarwal
11c874abae qcacld-3.0: Add intra bss forwarded packets count
Propagation from qcacld-2.0 to qcacld-3.0.

In lpm qos voting, no. of packets or bytes sent or received in a
particular amount of time is recorded and decision of disabling
or enabling lpm is done based on that. These packets are recorded
in HDD layer. In case when packets are forwarded to tx only, packets
don't come upto HDD layer and so in case of intra bss forwarding,
lpm qos voting is not being executed appropriately.

Add code to calculate the intra bss forwarded packets in txrx layer
and update them in calculating lpm qos voting.

Change-Id: I805663688cb300c8735b3e2f9680818a7b50bc9f
CRs-Fixed: 990868
2016-06-06 18:45:21 -07:00
Nirav Shah
07e39a6738 qcacld-3.0: Refactor DPTRACE to support new features
Refactor DPTRACE to support new datapath features like
TSO and FASTPATH and add support to log DHCP, ARP and
EAPOL packets.

Change-Id: I9b80a003759c962020165c21dbe29330700c4667
CRs-Fixed: 1008087
2016-06-06 18:45:16 -07:00
Nirav Shah
7f337dbb7a qcacld-3.0: Use different copy engine for packetlog
Create new endpoint and use CE11 for packetlog
messages from target to host.

CRs-Fixed: 995628
Change-Id: I0df597468b0b7399dc545b5a4d4fd1a4c04a1df0
2016-06-06 18:45:14 -07:00
Nirav Shah
f099e5e180 qcacld-3.0: Handle multiple map/unmap handler for same peer_id
Handle multiple map/unmap handler from firmware
for same peer_id. Firmware sends map/unmap event
per copy engine enabled for RX path.

CRs-Fixed: 1009289
Change-Id: Id8b0c27920a7aae95ddd4cff26731de85248457e
2016-06-01 10:45:58 -07:00
Yuanyuan Liu
0e0aa93d32 qcacld-3.0: Use PLD APIs
Replace CNSS/ICNSS APIs with PLD APIs.

Change-Id: Ic0be1ff00dd7b4fc0b125e625f5d3977f4580c5e
CRs-Fixed: 1014363
2016-05-23 11:45:57 -07:00
Mohit Khanna
043efbd6ae qcacld-3.0: Fix race condition between tx traffic and peer deletion
A race condition has been observed between outgoing TX traffic and
peer deletion when DUT has concurrent SAP(DBS) and STA sessions in 5G
and 2G respectively and the peer connected to SAP moves away triggering
peer deletion at DUT. Due to peer being deleted, the vdev corresponding
to the peer is void which results in a crash in ol_tx_data function
while trying to send Tx data.

Fix crash by checking for a null vdev in ol_tx_data.

CRs-Fixed: 1012681
Change-Id: Id0aab4b1f03ed24dfb55e09fa1a115edfdfcce84
2016-05-18 16:35:10 -07:00
Nirav Shah
9591970720 qcacld-3.0: Do not allocate large chunk of memory for rx hash
qcacld-2.0 to qcacld-3.0 propagation.
Do not allocate single large chunk of memory for rx hash
to avoid memory allocation failure. This change uses array
of pointers to reduce single large chunck of allocation.

Change-Id: I2aa7239be924b63c87f1044a74176a101d952108
CRs-Fixed: 954302
2016-05-18 16:33:49 -07:00
Nirav Shah
76291969a5 qcacld-3.0: Add logic in host to detect msdu_id duplication
Add logic in host to detect if host is using
musdu_id which is already in use.

CRs-Fixed: 929428
Change-Id: I10413ed4b5b76e16211aa0cbb9012cfb8f26cae0
2016-05-18 16:33:43 -07:00
Nirav Shah
6a4eee661c qcacld-3.0: Add histogram for MSDUs per RX indication
Add histogram for MSDUs per HTT RX indication
message and update drop counters in RX path.

Change-Id: Ia861f6cd3d6a91f01a07f9bc4e2bc3afcf62c8f2
CRs-Fixed: 999861
2016-05-18 16:33:32 -07:00
Manjunathappa Prakash
ef45abaa6e qcacld-3.0: Fix lro dereg crash on driver unload
If lro_disable is called after  cds_close, which is the case
for module unloads, then many of the pointers used in dereg
sequence are NULL (CE_state, hif, txrx_pdev). There is a case,
when interfaces are removed, when these pointers are there.
Check pointers before using them in dereg code.
Update hif_map_service_to_pipe so that it will return E_INVAL if
the service is not in the table. Add logs for cases where either
leg information is not updated on return.

Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>

Change-Id: I5b88a297134dcc1d7a6a68dd2a9879dfd1553a7e
CRs-Fixed: 1014428
2016-05-18 16:09:48 -07:00
Prakash Manjunathappa
0c45f699e9 qcacld-3.0: Shrink ol_txrx_stats_tso_info
The structure is taking too much of a space and pre-alloc was
failing for a single allocation for ol_txrx_pdev. Shrunk the
structure from 112 KB to 12 KB.
This update has a corresponding update in qcacmn.

Change-Id: I358e74b47165fa08cb5d37f095b44bff3f83fdfc
Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>
CRs-fixed: 1012346
2016-05-13 16:20:44 -07:00
Prakash Manjunathappa
6dc1a9658a qcacld-3.0: Fix crash on WMA path
During a recent merge, a frame type was being set to a similar
looking value (ol_tx_spec_no_free instead of ol_tx_frm_no_free) and
this is causing crashes on tx-completion.
Also capitalize the constants.
This is a stability CR.

Change-Id: Ic86dafc5baa80ae634c5267794f3add0e06d076f
Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>
CRs-fixed: 1010581
2016-05-13 16:20:43 -07:00
Prakash Manjunathappa
d3ccca2545 qcacld-3.0: Remove extra ticks-to-msec conversion
qdf_wait_single_event expects msecs as the timeout value.
However, two references in dp, second of which is this instance,
passes the value in ticks. This causes the value to be converted
to msecs a second time by the function and hence an incorrect
timeout value.
The other instance is in the qcacmn project.

Change-Id: I11c36ecf54b04cf1e3671a86594822b39b8ccaaf
Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>
CRs-fixed: 1012345
2016-05-13 16:20:43 -07:00
Manjunathappa Prakash
b757372528 qcacld-3.0: Add HTT datapath changes to handle monitor mode
Make special handling for monitor mode operation. Take care to handle
amsdu packets in which case firmware marks the last_frag in msdu_info
field. These MSDUs of AMSDU are stiched using frags_list of skb and
handed over to network stack.
Also take care to extract and update the radiotap header to head of
the packet.

Change-Id: I4ed9696175e63884b5db682a2a4c4df504a7fb20
CRs-Fixed: 963060
2016-05-06 17:01:48 -07:00
Dhanashri Atre
6e61e8cfba qcacld-3.0: Increase HTT Rx Ring
The firmware would like host to initially populate all 2K entries,
so that fw shadow ring will always have 1K entries to fetch after
the initial population of 512 entries to each mac.

Change-Id: I5f19a1e2693f54f9d7938b723d0d57487f842daf
CRs-Fixed: 1006872
2016-05-06 14:51:27 -07:00
Houston Hoffman
90e24d85f8 qcacld-3.0: Add hif_ctx to fastpath_cb_register api
Hif apis can't rely on a global context.

Change-Id: I2cad80573fc0102f210bb0f7c3f9e22c5f8e16f9
CRs-fixed: 1009274
2016-05-04 21:19:33 -07:00
Houston Hoffman
371d4a9340 qcacld-3.0: Use qdf macro for epping mode
Use QDF macro to check if we are in epping mode.
Remove bit masks of epping configuration.

Change-Id: I454ef259dfcc4b7c7860a5adfda605837f4a89cc
CRs-Fixed: 1003792
2016-05-04 21:18:51 -07:00
Mohit Khanna
137b97dd46 qcacld-3.0: Fix for IBSS lock-up issue
During IBSS session tear down, we are hitting a lockup. The issue is
seen as the pdev->peer_ref_mutex is being taken up twice in
ol_txrx_remove_peers_for_vdev and ol_txrx_peer_unref_delete. The later
function gets invoked by the former and hence we are stuck while trying
to acquire the spinlock, the second time.

Fix issue by releasing peer_ref_mutex lock before invoking
callback (wma_remove_peer) in ol_txrx_remove_peers_for_vdev function.

The dmesg signature of the lock-up is as follows

1100.230392:   <2> [<ffffffc0002035a4>] el1_irq+0x64/0xd4
1100.235432:   <2> [<ffffffbffc17e890>]
ol_txrx_peer_unref_delete+0xc4/0x33c [wlan]
1100.242461:   <2> [<ffffffbffc17ecc8>] ol_txrx_peer_detach+0x1c0/0x1e0
[wlan]
1100.249020:   <2> [<ffffffbffc160914>] wma_remove_peer+0x7c/0x18c
[wlan]
1100.255141:   <2> [<ffffffbffc17dee4>]
ol_txrx_remove_peers_for_vdev+0x170/0x1b0 [wlan]
1100.262606:   <2> [<ffffffbffc16311c>]
wma_vdev_stop_resp_handler+0x204/0x460 [wlan]
1100.269816:   <2> [<ffffffbffc1886a8>] __wmi_control_rx+0x280/0x2c0
[wlan]
1100.276204:   <2> [<ffffffbffc188a34>] wmi_process_fw_event+0x8/0x14
[wlan]
1100.282595:   <2> [<ffffffbffc157054>] wma_mc_process_msg+0x80c/0x27fc
[wlan]
1100.289176:   <2> [<ffffffbffc13f238>] $x+0x190/0x3f4 [wlan]
1100.294115:   <2> [<ffffffc00023d7e8>] kthread+0xac/0xb8

CRs-Fixed: 1006847
Change-Id: Icedeb172bbd6736ab39343391ff0643ddd688444
2016-04-27 17:00:25 -07:00
Nirav Shah
24e697ff3e qcacld-3.0: Update htc_endpoint only for htt tx endpoint
Update htc_endpoint only for htt tx endpoint to avoid
double freeing of Tx Queue packets as it will be
freed in htt_htc_misc_pkt_pool_free.
Rename htc_endpoint to htc_htt_tx_endpoint to reflect
it's appropriate use.

Change-Id: I736ba08505acc829eb15be30538553dd945695f6
CRs-Fixed: 1006498
2016-04-25 22:56:20 -07:00
Nirav Shah
7a0a90597b qcacld-3.0: Free all TX descriptors in error scenario
Forcefully free all TX descriptors during driver unload
which is not freed because of unmap event missing from
firmware to avoid memory leak.

Change-Id: I47ff7e6a8f2aa130c77ac68a92eee9373d152e87
CRs-Fixed: 1001994
2016-04-25 22:54:11 -07:00
Nirav Shah
194ce08855 qcacld-3.0: Add HTT packet in misc_list to avoid memleak
Add HTT packet buffer in misc_list for
HTT_H2T_MSG_TYPE_FRAG_DESC_BANK_CFG command to avoid memleak.

Change-Id: I1c3fb6232c4b7dab6c10459d53e611d3358b69cc
CRs-Fixed: 1001996
2016-04-25 22:52:55 -07:00
Mohit Khanna
0696eef313 qcacld-3.0: Fix RX data, peer unmap race condition
During peer unmap handler, while the peer is being deleted, there is a
possible race condition if the OL Rx thread is processing RX packets
and accesses the peer structure after its contents have been nulled.

Remove race condition by -
* Flush all RX packets in ol_txrx_peer_detach function which happens
  before peer unmap event is received from firmware
* Avoid use of peer data structures (for example peer->local_id)
  outside of peer->info_lock in ol_rx_data_cb function. Use cached
  local copies of peer data structures instead

Crash signature due to the race condition:

wlan: [0:E :CDF] TXRX: Deleting peer ffffffc012fd13c0
(02:a0:c6:81:f8:c0)
Unable to handle kernel paging request at virtual address 400000001
pgd = ffffffc0018b4000
[400000001] *pgd=0000000000000000, *pud=0000000000000000
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in: wlan(O) [last unloaded: wlan]
CPU: 1 PID: 29506 Comm: cds_ol_rx_threa Tainted: G        W  O
3.18.20-g5222edf-13780-g2219ed2 #1
Hardware name: Qualcomm Technologies, Inc. MSM 8996 v3 + PMI8996 CD (DT)
task: ffffffc09350d400 ti: ffffffc0556a4000 task.ti: ffffffc0556a4000
PC is at hdd_rx_packet_cbk+0x84/0x224 [wlan]
LR is at hdd_rx_packet_cbk+0x48/0x224 [wlan]
pc : [<ffffffbffdd55b5c>] lr : [<ffffffbffdd55b20>] pstate: 80000145

Change-Id: I4b32313024ec214f33dcdcfc401aadfa8af9d692
CRs-Fixed: 1002081
2016-04-21 20:23:50 -07:00
Yuanyuan Liu
bb116f2d4f qcacld-3.0: Fix compilation error for msmcobalt
Fix compilation error for msmcobalt when enable
CONFIG_WLAN_TX_FLOW_CONTROL_V2 feature.

CRs-Fixed: 1006068
Change-Id: Iab1c632c00a65a2c972c7701d66f3adff3073221
2016-04-21 20:23:44 -07:00
Houston Hoffman
23e76f99ce qcacld-3.0: enable additional two HTT data services
Enable HTT_DATA2_MSG_SVC and HTT_DATA3_MSG_SVC, using only
rx legs, CE 9 and 10, respectively. Add required CE entries
to the map that gets sent to the FW, and define the latter
service.
Rename htc_endpoint to htc_tx_endpoint in htt_pdev to
represent the role better.

Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>

Change-Id: I81ae796bdb7e632aa24f15c63a2811791dd29d28
CRs-Fixed: 982728
2016-04-20 22:25:01 -07:00
Poddar, Siddarth
8390502e2e qcacld-3.0: add ini support for throttling period duty cycles
qcacld-2.0 to qcacld-3.0 propagation

Provide support to configure duty cycle by adding ini item for
different level duty cycle.

CRs-Fixed: 990798
Change-Id: I95e4f4af669fd50c5b9fc10ffc61fa5d447b5bcf
2016-04-20 22:23:19 -07:00
Krishna Kumaar Natarajan
b7f9a35ce8 qcacld-3.0: Fix layering violation while handling management frames
Fix layering violation while handling management frames. Currently
LIM data structures are accessed before dropping Assoc, Disassoc and
Deauth packets to avoid DoS attacks. Since the LIM data structures
are accessed in different thread context, data present in them are
out of sync resulting in a crash.

Fix the layering violation by doing appropriate check in WMA instead
of doing the same in LIM

Change-Id: I8876a4d4b99948cd9ab3ccec403cf5e4050b1cff
CRs-Fixed: 977773
2016-04-20 22:23:06 -07:00
Rajeev Kumar
a4d80b5879 qcacld-3.0: Fix IPA backward compatibility
Fix IPA WDI 1.0 update for overwrite of previous commit and use
only QCA_WIFI_3_0 build flag for qcacld-3.0.

Change-Id: I3bff4a4e10102e97aeb57fb0f67d48933e0bae9b
CRs-fixed: 994144
2016-04-20 22:20:52 -07:00
Manjunathappa Prakash
585178db34 qcacld-3.0: Cleanup fastpath changes
Do following cleanup on fastpath code changes:
1) Remove reaping of Tx HIF buffers in Rx handling, instead handle
   reaping in Tx fastpath itself.
2) In ce_per_engine_service_fast check for more Rx packets after
   packet processing.
3) Make stub functions as static inline for non-fastpath enabled case.

Change-Id: If07c4344a424ce13b94128bf28931a24255b661a
CRs-Fixed: 987182
2016-04-17 18:16:51 -07:00
Manjunathappa Prakash
1c95626911 qcacld-3.0: add fastpath Rx support
With dedicated CE for Rx HTT messages, skip processing in HTC layer.
Do special handling in HIF-CE and HTT layer, this optimization results
in 3-4% CPU utilization gain.

Change-Id: I400148a0e24ac62dd09e2a95d5f35d94d83fe2df
CRs-Fixed: 987182
2016-04-17 18:16:43 -07:00
Manjunathappa Prakash
7e16b0a68f qcacld-3.0: Use fastpath Tx entry point with flowcontrol V2
Use common entry point ol_tx_ll_wrapper and use fastpath Tx if enabled.

Change-Id: I3a19fd6af43ab10eb5d8dd2754134a8dbc3783ab
CRs-Fixed: 987182
2016-04-17 17:59:18 -07:00
Nirav Shah
93e789e6d5 qcacld-3.0: Fix firmware statistics mask and format
Send prorper firmware statistics mask and fix
firmware statistics format

Change-Id: I786a7a6e3cec46660c497a001b4b39fb1a049b3a
CRs-Fixed: 986060
2016-04-17 17:55:45 -07:00
Nirav Shah
36a87bfb6e qcacld-3.0: Use sta id to derive peer in ol_rx_data_cb
Derive peer from sta id in ol_rx_data_cb to
make sure that peer is still valid before
using peer to avoid NULL pointer dereference

Change-Id: I8f9219d4c6ffbfb207385b08bc704cc0f86a1e1b
CRs-Fixed: 962949
2016-04-13 21:51:25 -07:00