diff options
Diffstat (limited to 'drivers/net/skfp/ess.c')
-rw-r--r-- | drivers/net/skfp/ess.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/net/skfp/ess.c b/drivers/net/skfp/ess.c index e8387d25f24a..8639a0884f5c 100644 --- a/drivers/net/skfp/ess.c +++ b/drivers/net/skfp/ess.c | |||
@@ -135,7 +135,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
135 | */ | 135 | */ |
136 | if (!(p = (void *) sm_to_para(smc,sm,SMT_P0015))) { | 136 | if (!(p = (void *) sm_to_para(smc,sm,SMT_P0015))) { |
137 | DB_ESS("ESS: RAF frame error, parameter type not found\n",0,0) ; | 137 | DB_ESS("ESS: RAF frame error, parameter type not found\n",0,0) ; |
138 | return(fs) ; | 138 | return fs; |
139 | } | 139 | } |
140 | msg_res_type = ((struct smt_p_0015 *)p)->res_type ; | 140 | msg_res_type = ((struct smt_p_0015 *)p)->res_type ; |
141 | 141 | ||
@@ -147,7 +147,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
147 | * error in frame: para ESS command was not found | 147 | * error in frame: para ESS command was not found |
148 | */ | 148 | */ |
149 | DB_ESS("ESS: RAF frame error, parameter command not found\n",0,0); | 149 | DB_ESS("ESS: RAF frame error, parameter command not found\n",0,0); |
150 | return(fs) ; | 150 | return fs; |
151 | } | 151 | } |
152 | 152 | ||
153 | DB_ESSN(2,"fc %x ft %x\n",sm->smt_class,sm->smt_type) ; | 153 | DB_ESSN(2,"fc %x ft %x\n",sm->smt_class,sm->smt_type) ; |
@@ -175,12 +175,12 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
175 | * local and no static allocation is used | 175 | * local and no static allocation is used |
176 | */ | 176 | */ |
177 | if (!local || smc->mib.fddiESSPayload) | 177 | if (!local || smc->mib.fddiESSPayload) |
178 | return(fs) ; | 178 | return fs; |
179 | 179 | ||
180 | p = (void *) sm_to_para(smc,sm,SMT_P0019) ; | 180 | p = (void *) sm_to_para(smc,sm,SMT_P0019) ; |
181 | for (i = 0; i < 5; i++) { | 181 | for (i = 0; i < 5; i++) { |
182 | if (((struct smt_p_0019 *)p)->alloc_addr.a[i]) { | 182 | if (((struct smt_p_0019 *)p)->alloc_addr.a[i]) { |
183 | return(fs) ; | 183 | return fs; |
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
@@ -199,10 +199,10 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
199 | sm->smt_dest = smt_sba_da ; | 199 | sm->smt_dest = smt_sba_da ; |
200 | 200 | ||
201 | if (smc->ess.local_sba_active) | 201 | if (smc->ess.local_sba_active) |
202 | return(fs | I_INDICATOR) ; | 202 | return fs | I_INDICATOR; |
203 | 203 | ||
204 | if (!(db = smt_get_mbuf(smc))) | 204 | if (!(db = smt_get_mbuf(smc))) |
205 | return(fs) ; | 205 | return fs; |
206 | 206 | ||
207 | db->sm_len = mb->sm_len ; | 207 | db->sm_len = mb->sm_len ; |
208 | db->sm_off = mb->sm_off ; | 208 | db->sm_off = mb->sm_off ; |
@@ -212,7 +212,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
212 | (struct smt_header *)(db->sm_data+db->sm_off), | 212 | (struct smt_header *)(db->sm_data+db->sm_off), |
213 | "RAF") ; | 213 | "RAF") ; |
214 | smt_send_frame(smc,db,FC_SMT_INFO,0) ; | 214 | smt_send_frame(smc,db,FC_SMT_INFO,0) ; |
215 | return(fs) ; | 215 | return fs; |
216 | } | 216 | } |
217 | 217 | ||
218 | /* | 218 | /* |
@@ -221,7 +221,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
221 | */ | 221 | */ |
222 | if (smt_check_para(smc,sm,plist_raf_alc_res)) { | 222 | if (smt_check_para(smc,sm,plist_raf_alc_res)) { |
223 | DB_ESS("ESS: RAF with para problem, ignoring\n",0,0) ; | 223 | DB_ESS("ESS: RAF with para problem, ignoring\n",0,0) ; |
224 | return(fs) ; | 224 | return fs; |
225 | } | 225 | } |
226 | 226 | ||
227 | /* | 227 | /* |
@@ -242,7 +242,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
242 | (sm->smt_tid != smc->ess.alloc_trans_id)) { | 242 | (sm->smt_tid != smc->ess.alloc_trans_id)) { |
243 | 243 | ||
244 | DB_ESS("ESS: Allocation Responce not accepted\n",0,0) ; | 244 | DB_ESS("ESS: Allocation Responce not accepted\n",0,0) ; |
245 | return(fs) ; | 245 | return fs; |
246 | } | 246 | } |
247 | 247 | ||
248 | /* | 248 | /* |
@@ -268,7 +268,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
268 | */ | 268 | */ |
269 | (void)process_bw_alloc(smc,(long)payload,(long)overhead) ; | 269 | (void)process_bw_alloc(smc,(long)payload,(long)overhead) ; |
270 | 270 | ||
271 | return(fs) ; | 271 | return fs; |
272 | /* end of Process Allocation Request */ | 272 | /* end of Process Allocation Request */ |
273 | 273 | ||
274 | /* | 274 | /* |
@@ -280,7 +280,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
280 | */ | 280 | */ |
281 | if (sm->smt_type != SMT_REQUEST) { | 281 | if (sm->smt_type != SMT_REQUEST) { |
282 | DB_ESS("ESS: Do not process Change Responses\n",0,0) ; | 282 | DB_ESS("ESS: Do not process Change Responses\n",0,0) ; |
283 | return(fs) ; | 283 | return fs; |
284 | } | 284 | } |
285 | 285 | ||
286 | /* | 286 | /* |
@@ -288,7 +288,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
288 | */ | 288 | */ |
289 | if (smt_check_para(smc,sm,plist_raf_chg_req)) { | 289 | if (smt_check_para(smc,sm,plist_raf_chg_req)) { |
290 | DB_ESS("ESS: RAF with para problem, ignoring\n",0,0) ; | 290 | DB_ESS("ESS: RAF with para problem, ignoring\n",0,0) ; |
291 | return(fs) ; | 291 | return fs; |
292 | } | 292 | } |
293 | 293 | ||
294 | /* | 294 | /* |
@@ -300,7 +300,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
300 | if ((((struct smt_p_320b *)sm_to_para(smc,sm,SMT_P320B))->path_index | 300 | if ((((struct smt_p_320b *)sm_to_para(smc,sm,SMT_P320B))->path_index |
301 | != PRIMARY_RING) || (msg_res_type != SYNC_BW)) { | 301 | != PRIMARY_RING) || (msg_res_type != SYNC_BW)) { |
302 | DB_ESS("ESS: RAF frame with para problem, ignoring\n",0,0) ; | 302 | DB_ESS("ESS: RAF frame with para problem, ignoring\n",0,0) ; |
303 | return(fs) ; | 303 | return fs; |
304 | } | 304 | } |
305 | 305 | ||
306 | /* | 306 | /* |
@@ -319,14 +319,14 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
319 | * process the bandwidth allocation | 319 | * process the bandwidth allocation |
320 | */ | 320 | */ |
321 | if(!process_bw_alloc(smc,(long)payload,(long)overhead)) | 321 | if(!process_bw_alloc(smc,(long)payload,(long)overhead)) |
322 | return(fs) ; | 322 | return fs; |
323 | 323 | ||
324 | /* | 324 | /* |
325 | * send an RAF Change Reply | 325 | * send an RAF Change Reply |
326 | */ | 326 | */ |
327 | ess_send_response(smc,sm,CHANGE_ALLOCATION) ; | 327 | ess_send_response(smc,sm,CHANGE_ALLOCATION) ; |
328 | 328 | ||
329 | return(fs) ; | 329 | return fs; |
330 | /* end of Process Change Request */ | 330 | /* end of Process Change Request */ |
331 | 331 | ||
332 | /* | 332 | /* |
@@ -338,7 +338,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
338 | */ | 338 | */ |
339 | if (sm->smt_type != SMT_REQUEST) { | 339 | if (sm->smt_type != SMT_REQUEST) { |
340 | DB_ESS("ESS: Do not process a Report Reply\n",0,0) ; | 340 | DB_ESS("ESS: Do not process a Report Reply\n",0,0) ; |
341 | return(fs) ; | 341 | return fs; |
342 | } | 342 | } |
343 | 343 | ||
344 | DB_ESSN(2,"ESS: Report Request from %s\n", | 344 | DB_ESSN(2,"ESS: Report Request from %s\n", |
@@ -349,7 +349,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
349 | */ | 349 | */ |
350 | if (msg_res_type != SYNC_BW) { | 350 | if (msg_res_type != SYNC_BW) { |
351 | DB_ESS("ESS: ignoring RAF with para problem\n",0,0) ; | 351 | DB_ESS("ESS: ignoring RAF with para problem\n",0,0) ; |
352 | return(fs) ; | 352 | return fs; |
353 | } | 353 | } |
354 | 354 | ||
355 | /* | 355 | /* |
@@ -357,7 +357,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
357 | */ | 357 | */ |
358 | ess_send_response(smc,sm,REPORT_ALLOCATION) ; | 358 | ess_send_response(smc,sm,REPORT_ALLOCATION) ; |
359 | 359 | ||
360 | return(fs) ; | 360 | return fs; |
361 | /* end of Process Report Request */ | 361 | /* end of Process Report Request */ |
362 | 362 | ||
363 | default: | 363 | default: |
@@ -368,7 +368,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
368 | break ; | 368 | break ; |
369 | } | 369 | } |
370 | 370 | ||
371 | return(fs) ; | 371 | return fs; |
372 | } | 372 | } |
373 | 373 | ||
374 | /* | 374 | /* |
@@ -418,17 +418,17 @@ static int process_bw_alloc(struct s_smc *smc, long int payload, long int overhe | |||
418 | */ | 418 | */ |
419 | /* if (smt_set_obj(smc,SMT_P320F,payload,S_SET)) { | 419 | /* if (smt_set_obj(smc,SMT_P320F,payload,S_SET)) { |
420 | DB_ESS("ESS: SMT does not accept the payload value\n",0,0) ; | 420 | DB_ESS("ESS: SMT does not accept the payload value\n",0,0) ; |
421 | return(FALSE) ; | 421 | return FALSE; |
422 | } | 422 | } |
423 | if (smt_set_obj(smc,SMT_P3210,overhead,S_SET)) { | 423 | if (smt_set_obj(smc,SMT_P3210,overhead,S_SET)) { |
424 | DB_ESS("ESS: SMT does not accept the overhead value\n",0,0) ; | 424 | DB_ESS("ESS: SMT does not accept the overhead value\n",0,0) ; |
425 | return(FALSE) ; | 425 | return FALSE; |
426 | } */ | 426 | } */ |
427 | 427 | ||
428 | /* premliminary */ | 428 | /* premliminary */ |
429 | if (payload > MAX_PAYLOAD || overhead > 5000) { | 429 | if (payload > MAX_PAYLOAD || overhead > 5000) { |
430 | DB_ESS("ESS: payload / overhead not accepted\n",0,0) ; | 430 | DB_ESS("ESS: payload / overhead not accepted\n",0,0) ; |
431 | return(FALSE) ; | 431 | return FALSE; |
432 | } | 432 | } |
433 | 433 | ||
434 | /* | 434 | /* |
@@ -468,7 +468,7 @@ static int process_bw_alloc(struct s_smc *smc, long int payload, long int overhe | |||
468 | 468 | ||
469 | ess_config_fifo(smc) ; | 469 | ess_config_fifo(smc) ; |
470 | set_formac_tsync(smc,smc->ess.sync_bw) ; | 470 | set_formac_tsync(smc,smc->ess.sync_bw) ; |
471 | return(TRUE) ; | 471 | return TRUE; |
472 | } | 472 | } |
473 | 473 | ||
474 | static void ess_send_response(struct s_smc *smc, struct smt_header *sm, | 474 | static void ess_send_response(struct s_smc *smc, struct smt_header *sm, |