| 350 | } |
| 351 | |
| 352 | static int |
| 353 | mrvl_init_hif(int core_id) |
| 354 | { |
| 355 | struct pp2_hif_params params; |
| 356 | char match[MRVL_MATCH_LEN]; |
| 357 | int ret; |
| 358 | |
| 359 | ret = mrvl_reserve_bit(&used_hifs, MRVL_MUSDK_HIFS_MAX); |
| 360 | if (ret < 0) { |
| 361 | MRVL_LOG(ERR, "Failed to allocate hif %d", core_id); |
| 362 | return ret; |
| 363 | } |
| 364 | |
| 365 | snprintf(match, sizeof(match), "hif-%d", ret); |
| 366 | memset(¶ms, 0, sizeof(params)); |
| 367 | params.match = match; |
| 368 | params.out_size = MRVL_PP2_AGGR_TXQD_MAX; |
| 369 | ret = pp2_hif_init(¶ms, &hifs[core_id]); |
| 370 | if (ret) { |
| 371 | MRVL_LOG(ERR, "Failed to initialize hif %d", core_id); |
| 372 | return ret; |
| 373 | } |
| 374 | |
| 375 | return 0; |
| 376 | } |
| 377 | |
| 378 | static inline struct pp2_hif* |
| 379 | mrvl_get_hif(struct mrvl_priv *priv, int core_id) |
no test coverage detected