| 1216 | } |
| 1217 | |
| 1218 | FError FXmacOsTx(FXmacOs *instance_p, void *tx_buf) |
| 1219 | { |
| 1220 | FXmacBdRing *txring; |
| 1221 | FError ret; |
| 1222 | struct pbuf *p; |
| 1223 | FASSERT(instance_p != NULL); |
| 1224 | FASSERT(tx_buf != NULL); |
| 1225 | |
| 1226 | p = tx_buf; |
| 1227 | txring = &(FXMAC_GET_TXRING(instance_p->instance)); |
| 1228 | FXmacProcessSentBds(instance_p, txring); |
| 1229 | |
| 1230 | /* check if space is available to send */ |
| 1231 | if (IsTxSpaceAvailable(instance_p)) |
| 1232 | { |
| 1233 | ret = FXmacOsOutput(instance_p, p); |
| 1234 | } |
| 1235 | else |
| 1236 | { |
| 1237 | #if LINK_STATS |
| 1238 | lwip_stats.link.drop++; |
| 1239 | #endif |
| 1240 | LOG_E("Pack dropped, no space."); |
| 1241 | ret = FREERTOS_XMAC_NO_VALID_SPACE; |
| 1242 | } |
| 1243 | |
| 1244 | return ret; |
| 1245 | } |
| 1246 | |
| 1247 | FXmacOs *FXmacOsGetInstancePointer(FXmacOsControl *config_p) |
| 1248 | { |
no test coverage detected