Changeset cbfece7 in mainline for uspace/app/nic/nic.c
- Timestamp:
- 2014-07-21T22:10:18Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1f1fa64
- Parents:
- 96e368a (diff), 54a1ca7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/nic/nic.c
r96e368a rcbfece7 60 60 printf("\taddr <mac_address> - set MAC address\n"); 61 61 printf("\tspeed <10|100|1000> - set NIC speed\n"); 62 printf("\tduplex <half|full> - set duplex mode\n"); 62 printf("\tduplex <half|full|simplex> - set duplex mode\n"); 63 printf("\tauto - enable autonegotiation\n"); 63 64 } 64 65 … … 206 207 } 207 208 208 printf("[ Service Name]\n");209 printf("[Index]: [Service Name]\n"); 209 210 for (i = 0; i < count; i++) { 210 211 rc = loc_service_get_name(nics[i], &svc_name); … … 320 321 321 322 return nic_set_operation_mode(sess, oldspeed, duplex, oldrole); 323 } 324 325 static int nic_set_autoneg(int i) 326 { 327 async_sess_t *sess; 328 int rc; 329 330 sess = get_nic_by_index(i); 331 if (sess == NULL) { 332 printf("Specified NIC doesn't exist or cannot connect to it.\n"); 333 return EINVAL; 334 } 335 336 rc = nic_autoneg_restart(sess); 337 if (rc != EOK) { 338 printf("Error restarting NIC autonegotiation.\n"); 339 return EIO; 340 } 341 342 return EOK; 322 343 } 323 344 … … 376 397 return nic_set_duplex(index, argv[3]); 377 398 399 if (!str_cmp(argv[2], "auto")) 400 return nic_set_autoneg(index); 401 378 402 } else { 379 403 printf(NAME ": Invalid argument.\n");
Note:
See TracChangeset
for help on using the changeset viewer.