File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,17 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local)
97
97
mutex_unlock (& local -> socket_lock );
98
98
}
99
99
100
+ static void nfc_llcp_clear_sdp (struct nfc_llcp_local * local )
101
+ {
102
+ mutex_lock (& local -> sdp_lock );
103
+
104
+ local -> local_wks = 0 ;
105
+ local -> local_sdp = 0 ;
106
+ local -> local_sap = 0 ;
107
+
108
+ mutex_unlock (& local -> sdp_lock );
109
+ }
110
+
100
111
static void nfc_llcp_timeout_work (struct work_struct * work )
101
112
{
102
113
struct nfc_llcp_local * local = container_of (work , struct nfc_llcp_local ,
@@ -857,6 +868,8 @@ void nfc_llcp_mac_is_down(struct nfc_dev *dev)
857
868
if (local == NULL )
858
869
return ;
859
870
871
+ nfc_llcp_clear_sdp (local );
872
+
860
873
/* Close and purge all existing sockets */
861
874
nfc_llcp_socket_release (local );
862
875
}
You can’t perform that action at this time.
0 commit comments