aboutsummaryrefslogtreecommitdiffstats
path: root/net/caif/cfcnfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/caif/cfcnfg.c')
-rw-r--r--net/caif/cfcnfg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/caif/cfcnfg.c b/net/caif/cfcnfg.c
index 21ede141018..c665de778b6 100644
--- a/net/caif/cfcnfg.c
+++ b/net/caif/cfcnfg.c
@@ -191,6 +191,7 @@ int cfcnfg_disconn_adapt_layer(struct cfcnfg *cnfg, struct cflayer *adap_layer)
191 struct cflayer *servl = NULL; 191 struct cflayer *servl = NULL;
192 struct cfcnfg_phyinfo *phyinfo = NULL; 192 struct cfcnfg_phyinfo *phyinfo = NULL;
193 u8 phyid = 0; 193 u8 phyid = 0;
194
194 caif_assert(adap_layer != NULL); 195 caif_assert(adap_layer != NULL);
195 channel_id = adap_layer->id; 196 channel_id = adap_layer->id;
196 if (adap_layer->dn == NULL || channel_id == 0) { 197 if (adap_layer->dn == NULL || channel_id == 0) {
@@ -199,16 +200,16 @@ int cfcnfg_disconn_adapt_layer(struct cfcnfg *cnfg, struct cflayer *adap_layer)
199 goto end; 200 goto end;
200 } 201 }
201 servl = cfmuxl_remove_uplayer(cnfg->mux, channel_id); 202 servl = cfmuxl_remove_uplayer(cnfg->mux, channel_id);
202 if (servl == NULL)
203 goto end;
204 layer_set_up(servl, NULL);
205 ret = cfctrl_linkdown_req(cnfg->ctrl, channel_id, adap_layer);
206 if (servl == NULL) { 203 if (servl == NULL) {
207 pr_err("PROTOCOL ERROR - Error removing service_layer Channel_Id(%d)", 204 pr_err("PROTOCOL ERROR - Error removing service_layer Channel_Id(%d)",
208 channel_id); 205 channel_id);
209 ret = -EINVAL; 206 ret = -EINVAL;
210 goto end; 207 goto end;
211 } 208 }
209 layer_set_up(servl, NULL);
210 ret = cfctrl_linkdown_req(cnfg->ctrl, channel_id, adap_layer);
211 if (ret)
212 goto end;
212 caif_assert(channel_id == servl->id); 213 caif_assert(channel_id == servl->id);
213 if (adap_layer->dn != NULL) { 214 if (adap_layer->dn != NULL) {
214 phyid = cfsrvl_getphyid(adap_layer->dn); 215 phyid = cfsrvl_getphyid(adap_layer->dn);