Wolfgang Denk | 4646d2a | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 1 | /** |
| 2 | * @file IxEthAccControlInterface.c |
| 3 | * |
| 4 | * @author Intel Corporation |
| 5 | * @date |
| 6 | * |
| 7 | * @brief IX_ETH_ACC_PUBLIC wrappers for control plane functions |
| 8 | * |
| 9 | * Design Notes: |
| 10 | * |
| 11 | * @par |
| 12 | * IXP400 SW Release version 2.0 |
| 13 | * |
| 14 | * -- Copyright Notice -- |
| 15 | * |
| 16 | * @par |
| 17 | * Copyright 2001-2005, Intel Corporation. |
| 18 | * All rights reserved. |
| 19 | * |
| 20 | * @par |
Wolfgang Denk | c57eadc | 2013-07-28 22:12:47 +0200 | [diff] [blame] | 21 | * SPDX-License-Identifier: BSD-3-Clause |
Wolfgang Denk | 4646d2a | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 22 | * @par |
| 23 | * -- End of Copyright Notice -- |
| 24 | */ |
| 25 | |
| 26 | #include "IxOsal.h" |
| 27 | #include "IxEthAcc.h" |
| 28 | #include "IxEthAcc_p.h" |
| 29 | |
| 30 | PUBLIC IxOsalMutex ixEthAccControlInterfaceMutex; |
| 31 | |
| 32 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 33 | ixEthAccPortEnable(IxEthAccPortId portId) |
| 34 | { |
| 35 | IxEthAccStatus result; |
| 36 | |
| 37 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 38 | { |
| 39 | printf("EthAcc: (Mac) cannot enable port %d, service not initialized\n", portId); |
| 40 | return (IX_ETH_ACC_FAIL); |
| 41 | } |
| 42 | |
| 43 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 44 | result = ixEthAccPortEnablePriv(portId); |
| 45 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 46 | return result; |
| 47 | } |
| 48 | |
| 49 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 50 | ixEthAccPortDisable(IxEthAccPortId portId) |
| 51 | { |
| 52 | IxEthAccStatus result; |
| 53 | |
| 54 | /* check the context is iinitialized */ |
| 55 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 56 | { |
| 57 | return (IX_ETH_ACC_FAIL); |
| 58 | } |
| 59 | |
| 60 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 61 | result = ixEthAccPortDisablePriv(portId); |
| 62 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 63 | return result; |
| 64 | } |
| 65 | |
| 66 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 67 | ixEthAccPortEnabledQuery(IxEthAccPortId portId, BOOL *enabled) |
| 68 | { |
| 69 | IxEthAccStatus result; |
| 70 | |
| 71 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 72 | { |
| 73 | return (IX_ETH_ACC_FAIL); |
| 74 | } |
| 75 | |
| 76 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 77 | result = ixEthAccPortEnabledQueryPriv(portId, enabled); |
| 78 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 79 | return result; |
| 80 | } |
| 81 | |
| 82 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 83 | ixEthAccPortPromiscuousModeClear(IxEthAccPortId portId) |
| 84 | { |
| 85 | IxEthAccStatus result; |
| 86 | |
| 87 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 88 | { |
| 89 | return (IX_ETH_ACC_FAIL); |
| 90 | } |
| 91 | |
| 92 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 93 | result = ixEthAccPortPromiscuousModeClearPriv(portId); |
| 94 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 95 | return result; |
| 96 | } |
| 97 | |
| 98 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 99 | ixEthAccPortPromiscuousModeSet(IxEthAccPortId portId) |
| 100 | { |
| 101 | IxEthAccStatus result; |
| 102 | |
| 103 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 104 | { |
| 105 | return (IX_ETH_ACC_FAIL); |
| 106 | } |
| 107 | |
| 108 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 109 | result = ixEthAccPortPromiscuousModeSetPriv(portId); |
| 110 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 111 | return result; |
| 112 | } |
| 113 | |
| 114 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 115 | ixEthAccPortUnicastMacAddressSet(IxEthAccPortId portId, IxEthAccMacAddr *macAddr) |
| 116 | { |
| 117 | IxEthAccStatus result; |
| 118 | |
| 119 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 120 | { |
| 121 | return (IX_ETH_ACC_FAIL); |
| 122 | } |
| 123 | |
| 124 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 125 | result = ixEthAccPortUnicastMacAddressSetPriv(portId, macAddr); |
| 126 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 127 | return result; |
| 128 | } |
| 129 | |
| 130 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 131 | ixEthAccPortUnicastMacAddressGet(IxEthAccPortId portId, IxEthAccMacAddr *macAddr) |
| 132 | { |
| 133 | IxEthAccStatus result; |
| 134 | |
| 135 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 136 | { |
| 137 | return (IX_ETH_ACC_FAIL); |
| 138 | } |
| 139 | |
| 140 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 141 | result = ixEthAccPortUnicastMacAddressGetPriv(portId, macAddr); |
| 142 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 143 | return result; |
| 144 | } |
| 145 | |
| 146 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 147 | ixEthAccPortMulticastAddressJoin(IxEthAccPortId portId, IxEthAccMacAddr *macAddr) |
| 148 | { |
| 149 | IxEthAccStatus result; |
| 150 | |
| 151 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 152 | { |
| 153 | return (IX_ETH_ACC_FAIL); |
| 154 | } |
| 155 | |
| 156 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 157 | result = ixEthAccPortMulticastAddressJoinPriv(portId, macAddr); |
| 158 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 159 | return result; |
| 160 | } |
| 161 | |
| 162 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 163 | ixEthAccPortMulticastAddressJoinAll(IxEthAccPortId portId) |
| 164 | { |
| 165 | IxEthAccStatus result; |
| 166 | |
| 167 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 168 | { |
| 169 | return (IX_ETH_ACC_FAIL); |
| 170 | } |
| 171 | |
| 172 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 173 | result = ixEthAccPortMulticastAddressJoinAllPriv(portId); |
| 174 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 175 | return result; |
| 176 | } |
| 177 | |
| 178 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 179 | ixEthAccPortMulticastAddressLeave(IxEthAccPortId portId, IxEthAccMacAddr *macAddr) |
| 180 | { |
| 181 | IxEthAccStatus result; |
| 182 | |
| 183 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 184 | { |
| 185 | return (IX_ETH_ACC_FAIL); |
| 186 | } |
| 187 | |
| 188 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 189 | result = ixEthAccPortMulticastAddressLeavePriv(portId, macAddr); |
| 190 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 191 | return result; |
| 192 | } |
| 193 | |
| 194 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 195 | ixEthAccPortMulticastAddressLeaveAll(IxEthAccPortId portId) |
| 196 | { |
| 197 | IxEthAccStatus result; |
| 198 | |
| 199 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 200 | { |
| 201 | return (IX_ETH_ACC_FAIL); |
| 202 | } |
| 203 | |
| 204 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 205 | result = ixEthAccPortMulticastAddressLeaveAllPriv(portId); |
| 206 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 207 | return result; |
| 208 | } |
| 209 | |
| 210 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 211 | ixEthAccPortUnicastAddressShow(IxEthAccPortId portId) |
| 212 | { |
| 213 | IxEthAccStatus result; |
| 214 | |
| 215 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 216 | { |
| 217 | return (IX_ETH_ACC_FAIL); |
| 218 | } |
| 219 | |
| 220 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 221 | result = ixEthAccPortUnicastAddressShowPriv(portId); |
| 222 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 223 | return result; |
| 224 | } |
| 225 | |
| 226 | IX_ETH_ACC_PUBLIC void |
| 227 | ixEthAccPortMulticastAddressShow(IxEthAccPortId portId) |
| 228 | { |
| 229 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 230 | { |
| 231 | return; |
| 232 | } |
| 233 | |
| 234 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 235 | ixEthAccPortMulticastAddressShowPriv(portId); |
| 236 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 237 | } |
| 238 | |
| 239 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 240 | ixEthAccPortDuplexModeSet(IxEthAccPortId portId, IxEthAccDuplexMode mode) |
| 241 | { |
| 242 | IxEthAccStatus result; |
| 243 | |
| 244 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 245 | { |
| 246 | return (IX_ETH_ACC_FAIL); |
| 247 | } |
| 248 | |
| 249 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 250 | result = ixEthAccPortDuplexModeSetPriv(portId, mode); |
| 251 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 252 | return result; |
| 253 | } |
| 254 | |
| 255 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 256 | ixEthAccPortDuplexModeGet(IxEthAccPortId portId, IxEthAccDuplexMode *mode) |
| 257 | { |
| 258 | IxEthAccStatus result; |
| 259 | |
| 260 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 261 | { |
| 262 | return (IX_ETH_ACC_FAIL); |
| 263 | } |
| 264 | |
| 265 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 266 | result = ixEthAccPortDuplexModeGetPriv(portId, mode); |
| 267 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 268 | return result; |
| 269 | } |
| 270 | |
| 271 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 272 | ixEthAccPortTxFrameAppendPaddingEnable(IxEthAccPortId portId) |
| 273 | { |
| 274 | IxEthAccStatus result; |
| 275 | |
| 276 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 277 | { |
| 278 | return (IX_ETH_ACC_FAIL); |
| 279 | } |
| 280 | |
| 281 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 282 | result = ixEthAccPortTxFrameAppendPaddingEnablePriv(portId); |
| 283 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 284 | return result; |
| 285 | } |
| 286 | |
| 287 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 288 | ixEthAccPortTxFrameAppendPaddingDisable(IxEthAccPortId portId) |
| 289 | { |
| 290 | IxEthAccStatus result; |
| 291 | |
| 292 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 293 | { |
| 294 | return (IX_ETH_ACC_FAIL); |
| 295 | } |
| 296 | |
| 297 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 298 | result = ixEthAccPortTxFrameAppendPaddingDisablePriv(portId); |
| 299 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 300 | return result; |
| 301 | } |
| 302 | |
| 303 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 304 | ixEthAccPortTxFrameAppendFCSEnable(IxEthAccPortId portId) |
| 305 | { |
| 306 | IxEthAccStatus result; |
| 307 | |
| 308 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 309 | { |
| 310 | return (IX_ETH_ACC_FAIL); |
| 311 | } |
| 312 | |
| 313 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 314 | result = ixEthAccPortTxFrameAppendFCSEnablePriv(portId); |
| 315 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 316 | return result; |
| 317 | } |
| 318 | |
| 319 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 320 | ixEthAccPortTxFrameAppendFCSDisable(IxEthAccPortId portId) |
| 321 | { |
| 322 | IxEthAccStatus result; |
| 323 | |
| 324 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 325 | { |
| 326 | return (IX_ETH_ACC_FAIL); |
| 327 | } |
| 328 | |
| 329 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 330 | result = ixEthAccPortTxFrameAppendFCSDisablePriv(portId); |
| 331 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 332 | return result; |
| 333 | } |
| 334 | |
| 335 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 336 | ixEthAccPortRxFrameAppendFCSEnable(IxEthAccPortId portId) |
| 337 | { |
| 338 | IxEthAccStatus result; |
| 339 | |
| 340 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 341 | { |
| 342 | return (IX_ETH_ACC_FAIL); |
| 343 | } |
| 344 | |
| 345 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 346 | result = ixEthAccPortRxFrameAppendFCSEnablePriv(portId); |
| 347 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 348 | return result; |
| 349 | } |
| 350 | |
| 351 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 352 | ixEthAccPortRxFrameAppendFCSDisable(IxEthAccPortId portId) |
| 353 | { |
| 354 | IxEthAccStatus result; |
| 355 | |
| 356 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 357 | { |
| 358 | return (IX_ETH_ACC_FAIL); |
| 359 | } |
| 360 | |
| 361 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 362 | result = ixEthAccPortRxFrameAppendFCSDisablePriv(portId); |
| 363 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 364 | return result; |
| 365 | } |
| 366 | |
| 367 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 368 | ixEthAccTxSchedulingDisciplineSet(IxEthAccPortId portId, IxEthAccSchedulerDiscipline sched) |
| 369 | { |
| 370 | IxEthAccStatus result; |
| 371 | |
| 372 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 373 | { |
| 374 | return (IX_ETH_ACC_FAIL); |
| 375 | } |
| 376 | |
| 377 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 378 | result = ixEthAccTxSchedulingDisciplineSetPriv(portId, sched); |
| 379 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 380 | return result; |
| 381 | } |
| 382 | |
| 383 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 384 | ixEthAccRxSchedulingDisciplineSet(IxEthAccSchedulerDiscipline sched) |
| 385 | { |
| 386 | IxEthAccStatus result; |
| 387 | |
| 388 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 389 | { |
| 390 | return (IX_ETH_ACC_FAIL); |
| 391 | } |
| 392 | |
| 393 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 394 | result = ixEthAccRxSchedulingDisciplineSetPriv(sched); |
| 395 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 396 | return result; |
| 397 | } |
| 398 | |
| 399 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 400 | ixEthAccPortNpeLoopbackEnable(IxEthAccPortId portId) |
| 401 | { |
| 402 | IxEthAccStatus result; |
| 403 | |
| 404 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 405 | { |
| 406 | return (IX_ETH_ACC_FAIL); |
| 407 | } |
| 408 | |
| 409 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 410 | result = ixEthAccNpeLoopbackEnablePriv(portId); |
| 411 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 412 | return result; |
| 413 | } |
| 414 | |
| 415 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 416 | ixEthAccPortTxEnable(IxEthAccPortId portId) |
| 417 | { |
| 418 | IxEthAccStatus result; |
| 419 | |
| 420 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 421 | { |
| 422 | return (IX_ETH_ACC_FAIL); |
| 423 | } |
| 424 | |
| 425 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 426 | result = ixEthAccPortTxEnablePriv(portId); |
| 427 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 428 | return result; |
| 429 | } |
| 430 | |
| 431 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 432 | ixEthAccPortRxEnable(IxEthAccPortId portId) |
| 433 | { |
| 434 | IxEthAccStatus result; |
| 435 | |
| 436 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 437 | { |
| 438 | return (IX_ETH_ACC_FAIL); |
| 439 | } |
| 440 | |
| 441 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 442 | result = ixEthAccPortRxEnablePriv(portId); |
| 443 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 444 | return result; |
| 445 | } |
| 446 | |
| 447 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 448 | ixEthAccPortNpeLoopbackDisable(IxEthAccPortId portId) |
| 449 | { |
| 450 | IxEthAccStatus result; |
| 451 | |
| 452 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 453 | { |
| 454 | return (IX_ETH_ACC_FAIL); |
| 455 | } |
| 456 | |
| 457 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 458 | result = ixEthAccNpeLoopbackDisablePriv(portId); |
| 459 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 460 | return result; |
| 461 | } |
| 462 | |
| 463 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 464 | ixEthAccPortTxDisable(IxEthAccPortId portId) |
| 465 | { |
| 466 | IxEthAccStatus result; |
| 467 | |
| 468 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 469 | { |
| 470 | return (IX_ETH_ACC_FAIL); |
| 471 | } |
| 472 | |
| 473 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 474 | result = ixEthAccPortTxDisablePriv(portId); |
| 475 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 476 | return result; |
| 477 | } |
| 478 | |
| 479 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 480 | ixEthAccPortRxDisable(IxEthAccPortId portId) |
| 481 | { |
| 482 | IxEthAccStatus result; |
| 483 | |
| 484 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 485 | { |
| 486 | return (IX_ETH_ACC_FAIL); |
| 487 | } |
| 488 | |
| 489 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 490 | result = ixEthAccPortRxDisablePriv(portId); |
| 491 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 492 | return result; |
| 493 | } |
| 494 | |
| 495 | IX_ETH_ACC_PUBLIC IxEthAccStatus |
| 496 | ixEthAccPortMacReset(IxEthAccPortId portId) |
| 497 | { |
| 498 | IxEthAccStatus result; |
| 499 | |
| 500 | if (!IX_ETH_ACC_IS_SERVICE_INITIALIZED()) |
| 501 | { |
| 502 | return (IX_ETH_ACC_FAIL); |
| 503 | } |
| 504 | |
| 505 | ixOsalMutexLock(&ixEthAccControlInterfaceMutex, IX_OSAL_WAIT_FOREVER); |
| 506 | result = ixEthAccPortMacResetPriv(portId); |
| 507 | ixOsalMutexUnlock(&ixEthAccControlInterfaceMutex); |
| 508 | return result; |
| 509 | } |