diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2010-12-10 15:04:00 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-12-13 13:31:52 -0500 |
commit | a388eb1727c15a7da1f64fcf16e60fcb7aca40bd (patch) | |
tree | 9be3aca42bbfa39d46c715c8992f08d69698bb5b | |
parent | 53d21fdbf4d38dcfe27173d746acf74ea1a19958 (diff) |
staging: hv: Convert camel cased struct fields in rndis.h to lower cases
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/hv/rndis.h | 353 | ||||
-rw-r--r-- | drivers/staging/hv/rndis_filter.c | 204 |
2 files changed, 279 insertions, 278 deletions
diff --git a/drivers/staging/hv/rndis.h b/drivers/staging/hv/rndis.h index 723e1f15b90d..014de047b86d 100644 --- a/drivers/staging/hv/rndis.h +++ b/drivers/staging/hv/rndis.h | |||
@@ -288,24 +288,24 @@ | |||
288 | #define RNDIS_DF_RAW_DATA 0x00000004 | 288 | #define RNDIS_DF_RAW_DATA 0x00000004 |
289 | 289 | ||
290 | /* Remote NDIS medium types. */ | 290 | /* Remote NDIS medium types. */ |
291 | #define RNdisMedium802_3 0x00000000 | 291 | #define RNDIS_MEDIUM_802_3 0x00000000 |
292 | #define RNdisMedium802_5 0x00000001 | 292 | #define RNDIS_MEDIUM_802_5 0x00000001 |
293 | #define RNdisMediumFddi 0x00000002 | 293 | #define RNDIS_MEDIUM_FDDI 0x00000002 |
294 | #define RNdisMediumWan 0x00000003 | 294 | #define RNDIS_MEDIUM_WAN 0x00000003 |
295 | #define RNdisMediumLocalTalk 0x00000004 | 295 | #define RNDIS_MEDIUM_LOCAL_TALK 0x00000004 |
296 | #define RNdisMediumArcnetRaw 0x00000006 | 296 | #define RNDIS_MEDIUM_ARCNET_RAW 0x00000006 |
297 | #define RNdisMediumArcnet878_2 0x00000007 | 297 | #define RNDIS_MEDIUM_ARCNET_878_2 0x00000007 |
298 | #define RNdisMediumAtm 0x00000008 | 298 | #define RNDIS_MEDIUM_ATM 0x00000008 |
299 | #define RNdisMediumWirelessWan 0x00000009 | 299 | #define RNDIS_MEDIUM_WIRELESS_WAN 0x00000009 |
300 | #define RNdisMediumIrda 0x0000000a | 300 | #define RNDIS_MEDIUM_IRDA 0x0000000a |
301 | #define RNdisMediumCoWan 0x0000000b | 301 | #define RNDIS_MEDIUM_CO_WAN 0x0000000b |
302 | /* Not a real medium, defined as an upper-bound */ | 302 | /* Not a real medium, defined as an upper-bound */ |
303 | #define RNdisMediumMax 0x0000000d | 303 | #define RNDIS_MEDIUM_MAX 0x0000000d |
304 | 304 | ||
305 | 305 | ||
306 | /* Remote NDIS medium connection states. */ | 306 | /* Remote NDIS medium connection states. */ |
307 | #define RNdisMediaStateConnected 0x00000000 | 307 | #define RNDIS_MEDIA_STATE_CONNECTED 0x00000000 |
308 | #define RNdisMediaStateDisconnected 0x00000001 | 308 | #define RNDIS_MEDIA_STATE_DISCONNECTED 0x00000001 |
309 | 309 | ||
310 | /* Remote NDIS version numbers */ | 310 | /* Remote NDIS version numbers */ |
311 | #define RNDIS_MAJOR_VERSION 0x00000001 | 311 | #define RNDIS_MAJOR_VERSION 0x00000001 |
@@ -314,106 +314,106 @@ | |||
314 | 314 | ||
315 | /* NdisInitialize message */ | 315 | /* NdisInitialize message */ |
316 | struct rndis_initialize_request { | 316 | struct rndis_initialize_request { |
317 | u32 RequestId; | 317 | u32 req_id; |
318 | u32 MajorVersion; | 318 | u32 major_ver; |
319 | u32 MinorVersion; | 319 | u32 minor_ver; |
320 | u32 MaxTransferSize; | 320 | u32 max_xfer_size; |
321 | }; | 321 | }; |
322 | 322 | ||
323 | /* Response to NdisInitialize */ | 323 | /* Response to NdisInitialize */ |
324 | struct rndis_initialize_complete { | 324 | struct rndis_initialize_complete { |
325 | u32 RequestId; | 325 | u32 req_id; |
326 | u32 Status; | 326 | u32 status; |
327 | u32 MajorVersion; | 327 | u32 major_ver; |
328 | u32 MinorVersion; | 328 | u32 minor_ver; |
329 | u32 DeviceFlags; | 329 | u32 dev_flags; |
330 | u32 Medium; | 330 | u32 medium; |
331 | u32 MaxPacketsPerMessage; | 331 | u32 max_pkt_per_msg; |
332 | u32 MaxTransferSize; | 332 | u32 max_xfer_size; |
333 | u32 PacketAlignmentFactor; | 333 | u32 pkt_alignment_factor; |
334 | u32 AFListOffset; | 334 | u32 af_list_offset; |
335 | u32 AFListSize; | 335 | u32 af_list_size; |
336 | }; | 336 | }; |
337 | 337 | ||
338 | /* Call manager devices only: Information about an address family */ | 338 | /* Call manager devices only: Information about an address family */ |
339 | /* supported by the device is appended to the response to NdisInitialize. */ | 339 | /* supported by the device is appended to the response to NdisInitialize. */ |
340 | struct rndis_co_address_family { | 340 | struct rndis_co_address_family { |
341 | u32 AddressFamily; | 341 | u32 address_family; |
342 | u32 MajorVersion; | 342 | u32 major_ver; |
343 | u32 MinorVersion; | 343 | u32 minor_ver; |
344 | }; | 344 | }; |
345 | 345 | ||
346 | /* NdisHalt message */ | 346 | /* NdisHalt message */ |
347 | struct rndis_halt_request { | 347 | struct rndis_halt_request { |
348 | u32 RequestId; | 348 | u32 req_id; |
349 | }; | 349 | }; |
350 | 350 | ||
351 | /* NdisQueryRequest message */ | 351 | /* NdisQueryRequest message */ |
352 | struct rndis_query_request { | 352 | struct rndis_query_request { |
353 | u32 RequestId; | 353 | u32 req_id; |
354 | u32 Oid; | 354 | u32 oid; |
355 | u32 InformationBufferLength; | 355 | u32 info_buflen; |
356 | u32 InformationBufferOffset; | 356 | u32 info_buf_offset; |
357 | u32 DeviceVcHandle; | 357 | u32 dev_vc_handle; |
358 | }; | 358 | }; |
359 | 359 | ||
360 | /* Response to NdisQueryRequest */ | 360 | /* Response to NdisQueryRequest */ |
361 | struct rndis_query_complete { | 361 | struct rndis_query_complete { |
362 | u32 RequestId; | 362 | u32 req_id; |
363 | u32 Status; | 363 | u32 status; |
364 | u32 InformationBufferLength; | 364 | u32 info_buflen; |
365 | u32 InformationBufferOffset; | 365 | u32 info_buf_offset; |
366 | }; | 366 | }; |
367 | 367 | ||
368 | /* NdisSetRequest message */ | 368 | /* NdisSetRequest message */ |
369 | struct rndis_set_request { | 369 | struct rndis_set_request { |
370 | u32 RequestId; | 370 | u32 req_id; |
371 | u32 Oid; | 371 | u32 oid; |
372 | u32 InformationBufferLength; | 372 | u32 info_buflen; |
373 | u32 InformationBufferOffset; | 373 | u32 info_buf_offset; |
374 | u32 DeviceVcHandle; | 374 | u32 dev_vc_handle; |
375 | }; | 375 | }; |
376 | 376 | ||
377 | /* Response to NdisSetRequest */ | 377 | /* Response to NdisSetRequest */ |
378 | struct rndis_set_complete { | 378 | struct rndis_set_complete { |
379 | u32 RequestId; | 379 | u32 req_id; |
380 | u32 Status; | 380 | u32 status; |
381 | }; | 381 | }; |
382 | 382 | ||
383 | /* NdisReset message */ | 383 | /* NdisReset message */ |
384 | struct rndis_reset_request { | 384 | struct rndis_reset_request { |
385 | u32 Reserved; | 385 | u32 reserved; |
386 | }; | 386 | }; |
387 | 387 | ||
388 | /* Response to NdisReset */ | 388 | /* Response to NdisReset */ |
389 | struct rndis_reset_complete { | 389 | struct rndis_reset_complete { |
390 | u32 Status; | 390 | u32 status; |
391 | u32 AddressingReset; | 391 | u32 addressing_reset; |
392 | }; | 392 | }; |
393 | 393 | ||
394 | /* NdisMIndicateStatus message */ | 394 | /* NdisMIndicateStatus message */ |
395 | struct rndis_indicate_status { | 395 | struct rndis_indicate_status { |
396 | u32 Status; | 396 | u32 status; |
397 | u32 StatusBufferLength; | 397 | u32 status_buflen; |
398 | u32 StatusBufferOffset; | 398 | u32 status_buf_offset; |
399 | }; | 399 | }; |
400 | 400 | ||
401 | /* Diagnostic information passed as the status buffer in */ | 401 | /* Diagnostic information passed as the status buffer in */ |
402 | /* struct rndis_indicate_status messages signifying error conditions. */ | 402 | /* struct rndis_indicate_status messages signifying error conditions. */ |
403 | struct rndis_diagnostic_info { | 403 | struct rndis_diagnostic_info { |
404 | u32 DiagStatus; | 404 | u32 diag_status; |
405 | u32 ErrorOffset; | 405 | u32 error_offset; |
406 | }; | 406 | }; |
407 | 407 | ||
408 | /* NdisKeepAlive message */ | 408 | /* NdisKeepAlive message */ |
409 | struct rndis_keepalive_request { | 409 | struct rndis_keepalive_request { |
410 | u32 RequestId; | 410 | u32 req_id; |
411 | }; | 411 | }; |
412 | 412 | ||
413 | /* Response to NdisKeepAlive */ | 413 | /* Response to NdisKeepAlive */ |
414 | struct rndis_keepalive_complete { | 414 | struct rndis_keepalive_complete { |
415 | u32 RequestId; | 415 | u32 req_id; |
416 | u32 Status; | 416 | u32 status; |
417 | }; | 417 | }; |
418 | 418 | ||
419 | /* | 419 | /* |
@@ -422,39 +422,39 @@ struct rndis_keepalive_complete { | |||
422 | * to 0 for connectionless data, otherwise it contains the VC handle. | 422 | * to 0 for connectionless data, otherwise it contains the VC handle. |
423 | */ | 423 | */ |
424 | struct rndis_packet { | 424 | struct rndis_packet { |
425 | u32 DataOffset; | 425 | u32 data_offset; |
426 | u32 DataLength; | 426 | u32 data_len; |
427 | u32 OOBDataOffset; | 427 | u32 oob_data_offset; |
428 | u32 OOBDataLength; | 428 | u32 oob_data_len; |
429 | u32 NumOOBDataElements; | 429 | u32 num_oob_data_elements; |
430 | u32 PerPacketInfoOffset; | 430 | u32 per_pkt_info_offset; |
431 | u32 PerPacketInfoLength; | 431 | u32 per_pkt_info_len; |
432 | u32 VcHandle; | 432 | u32 vc_handle; |
433 | u32 Reserved; | 433 | u32 reserved; |
434 | }; | 434 | }; |
435 | 435 | ||
436 | /* Optional Out of Band data associated with a Data message. */ | 436 | /* Optional Out of Band data associated with a Data message. */ |
437 | struct rndis_oobd { | 437 | struct rndis_oobd { |
438 | u32 Size; | 438 | u32 size; |
439 | u32 Type; | 439 | u32 type; |
440 | u32 ClassInformationOffset; | 440 | u32 class_info_offset; |
441 | }; | 441 | }; |
442 | 442 | ||
443 | /* Packet extension field contents associated with a Data message. */ | 443 | /* Packet extension field contents associated with a Data message. */ |
444 | struct rndis_per_packet_info { | 444 | struct rndis_per_packet_info { |
445 | u32 Size; | 445 | u32 size; |
446 | u32 Type; | 446 | u32 type; |
447 | u32 PerPacketInformationOffset; | 447 | u32 per_pkt_info_offset; |
448 | }; | 448 | }; |
449 | 449 | ||
450 | /* Format of Information buffer passed in a SetRequest for the OID */ | 450 | /* Format of Information buffer passed in a SetRequest for the OID */ |
451 | /* OID_GEN_RNDIS_CONFIG_PARAMETER. */ | 451 | /* OID_GEN_RNDIS_CONFIG_PARAMETER. */ |
452 | struct rndis_config_parameter_info { | 452 | struct rndis_config_parameter_info { |
453 | u32 ParameterNameOffset; | 453 | u32 parameter_name_offset; |
454 | u32 ParameterNameLength; | 454 | u32 parameter_name_length; |
455 | u32 ParameterType; | 455 | u32 parameter_type; |
456 | u32 ParameterValueOffset; | 456 | u32 parameter_value_offset; |
457 | u32 ParameterValueLength; | 457 | u32 parameter_value_length; |
458 | }; | 458 | }; |
459 | 459 | ||
460 | /* Values for ParameterType in struct rndis_config_parameter_info */ | 460 | /* Values for ParameterType in struct rndis_config_parameter_info */ |
@@ -466,187 +466,188 @@ struct rndis_config_parameter_info { | |||
466 | 466 | ||
467 | /* CoNdisMiniportCreateVc message */ | 467 | /* CoNdisMiniportCreateVc message */ |
468 | struct rcondis_mp_create_vc { | 468 | struct rcondis_mp_create_vc { |
469 | u32 RequestId; | 469 | u32 req_id; |
470 | u32 NdisVcHandle; | 470 | u32 ndis_vc_handle; |
471 | }; | 471 | }; |
472 | 472 | ||
473 | /* Response to CoNdisMiniportCreateVc */ | 473 | /* Response to CoNdisMiniportCreateVc */ |
474 | struct rcondis_mp_create_vc_complete { | 474 | struct rcondis_mp_create_vc_complete { |
475 | u32 RequestId; | 475 | u32 req_id; |
476 | u32 DeviceVcHandle; | 476 | u32 dev_vc_handle; |
477 | u32 Status; | 477 | u32 status; |
478 | }; | 478 | }; |
479 | 479 | ||
480 | /* CoNdisMiniportDeleteVc message */ | 480 | /* CoNdisMiniportDeleteVc message */ |
481 | struct rcondis_mp_delete_vc { | 481 | struct rcondis_mp_delete_vc { |
482 | u32 RequestId; | 482 | u32 req_id; |
483 | u32 DeviceVcHandle; | 483 | u32 dev_vc_handle; |
484 | }; | 484 | }; |
485 | 485 | ||
486 | /* Response to CoNdisMiniportDeleteVc */ | 486 | /* Response to CoNdisMiniportDeleteVc */ |
487 | struct rcondis_mp_delete_vc_complete { | 487 | struct rcondis_mp_delete_vc_complete { |
488 | u32 RequestId; | 488 | u32 req_id; |
489 | u32 Status; | 489 | u32 status; |
490 | }; | 490 | }; |
491 | 491 | ||
492 | /* CoNdisMiniportQueryRequest message */ | 492 | /* CoNdisMiniportQueryRequest message */ |
493 | struct rcondis_mp_query_request { | 493 | struct rcondis_mp_query_request { |
494 | u32 RequestId; | 494 | u32 req_id; |
495 | u32 RequestType; | 495 | u32 request_type; |
496 | u32 Oid; | 496 | u32 oid; |
497 | u32 DeviceVcHandle; | 497 | u32 dev_vc_handle; |
498 | u32 InformationBufferLength; | 498 | u32 info_buflen; |
499 | u32 InformationBufferOffset; | 499 | u32 info_buf_offset; |
500 | }; | 500 | }; |
501 | 501 | ||
502 | /* CoNdisMiniportSetRequest message */ | 502 | /* CoNdisMiniportSetRequest message */ |
503 | struct rcondis_mp_set_request { | 503 | struct rcondis_mp_set_request { |
504 | u32 RequestId; | 504 | u32 req_id; |
505 | u32 RequestType; | 505 | u32 request_type; |
506 | u32 Oid; | 506 | u32 oid; |
507 | u32 DeviceVcHandle; | 507 | u32 dev_vc_handle; |
508 | u32 InformationBufferLength; | 508 | u32 info_buflen; |
509 | u32 InformationBufferOffset; | 509 | u32 info_buf_offset; |
510 | }; | 510 | }; |
511 | 511 | ||
512 | /* CoNdisIndicateStatus message */ | 512 | /* CoNdisIndicateStatus message */ |
513 | struct rcondis_indicate_status { | 513 | struct rcondis_indicate_status { |
514 | u32 NdisVcHandle; | 514 | u32 ndis_vc_handle; |
515 | u32 Status; | 515 | u32 status; |
516 | u32 StatusBufferLength; | 516 | u32 status_buflen; |
517 | u32 StatusBufferOffset; | 517 | u32 status_buf_offset; |
518 | }; | 518 | }; |
519 | 519 | ||
520 | /* CONDIS Call/VC parameters */ | 520 | /* CONDIS Call/VC parameters */ |
521 | struct rcondis_specific_parameters { | 521 | struct rcondis_specific_parameters { |
522 | u32 ParameterType; | 522 | u32 parameter_type; |
523 | u32 ParameterLength; | 523 | u32 parameter_length; |
524 | u32 ParameterOffset; | 524 | u32 parameter_lffset; |
525 | }; | 525 | }; |
526 | 526 | ||
527 | struct rcondis_media_parameters { | 527 | struct rcondis_media_parameters { |
528 | u32 Flags; | 528 | u32 flags; |
529 | u32 Reserved1; | 529 | u32 reserved1; |
530 | u32 Reserved2; | 530 | u32 reserved2; |
531 | struct rcondis_specific_parameters MediaSpecific; | 531 | struct rcondis_specific_parameters media_specific; |
532 | }; | 532 | }; |
533 | 533 | ||
534 | struct rndis_flowspec { | 534 | struct rndis_flowspec { |
535 | u32 TokenRate; | 535 | u32 token_rate; |
536 | u32 TokenBucketSize; | 536 | u32 token_bucket_size; |
537 | u32 PeakBandwidth; | 537 | u32 peak_bandwidth; |
538 | u32 Latency; | 538 | u32 latency; |
539 | u32 DelayVariation; | 539 | u32 delay_variation; |
540 | u32 ServiceType; | 540 | u32 service_type; |
541 | u32 MaxSduSize; | 541 | u32 max_sdu_size; |
542 | u32 MinimumPolicedSize; | 542 | u32 minimum_policed_size; |
543 | }; | 543 | }; |
544 | 544 | ||
545 | struct rcondis_call_manager_parameters { | 545 | struct rcondis_call_manager_parameters { |
546 | struct rndis_flowspec Transmit; | 546 | struct rndis_flowspec transmit; |
547 | struct rndis_flowspec Receive; | 547 | struct rndis_flowspec receive; |
548 | struct rcondis_specific_parameters CallMgrSpecific; | 548 | struct rcondis_specific_parameters call_mgr_specific; |
549 | }; | 549 | }; |
550 | 550 | ||
551 | /* CoNdisMiniportActivateVc message */ | 551 | /* CoNdisMiniportActivateVc message */ |
552 | struct rcondis_mp_activate_vc_request { | 552 | struct rcondis_mp_activate_vc_request { |
553 | u32 RequestId; | 553 | u32 req_id; |
554 | u32 Flags; | 554 | u32 flags; |
555 | u32 DeviceVcHandle; | 555 | u32 dev_vc_handle; |
556 | u32 MediaParamsOffset; | 556 | u32 media_params_offset; |
557 | u32 MediaParamsLength; | 557 | u32 media_params_length; |
558 | u32 CallMgrParamsOffset; | 558 | u32 call_mgr_params_offset; |
559 | u32 CallMgrParamsLength; | 559 | u32 call_mgr_params_length; |
560 | }; | 560 | }; |
561 | 561 | ||
562 | /* Response to CoNdisMiniportActivateVc */ | 562 | /* Response to CoNdisMiniportActivateVc */ |
563 | struct rcondis_mp_activate_vc_complete { | 563 | struct rcondis_mp_activate_vc_complete { |
564 | u32 RequestId; | 564 | u32 req_id; |
565 | u32 Status; | 565 | u32 status; |
566 | }; | 566 | }; |
567 | 567 | ||
568 | /* CoNdisMiniportDeactivateVc message */ | 568 | /* CoNdisMiniportDeactivateVc message */ |
569 | struct rcondis_mp_deactivate_vc_request { | 569 | struct rcondis_mp_deactivate_vc_request { |
570 | u32 RequestId; | 570 | u32 req_id; |
571 | u32 Flags; | 571 | u32 flags; |
572 | u32 DeviceVcHandle; | 572 | u32 dev_vc_handle; |
573 | }; | 573 | }; |
574 | 574 | ||
575 | /* Response to CoNdisMiniportDeactivateVc */ | 575 | /* Response to CoNdisMiniportDeactivateVc */ |
576 | struct rcondis_mp_deactivate_vc_complete { | 576 | struct rcondis_mp_deactivate_vc_complete { |
577 | u32 RequestId; | 577 | u32 req_id; |
578 | u32 Status; | 578 | u32 status; |
579 | }; | 579 | }; |
580 | 580 | ||
581 | 581 | ||
582 | /* union with all of the RNDIS messages */ | 582 | /* union with all of the RNDIS messages */ |
583 | union rndis_message_container { | 583 | union rndis_message_container { |
584 | struct rndis_packet Packet; | 584 | struct rndis_packet pkt; |
585 | struct rndis_initialize_request InitializeRequest; | 585 | struct rndis_initialize_request init_req; |
586 | struct rndis_halt_request HaltRequest; | 586 | struct rndis_halt_request halt_req; |
587 | struct rndis_query_request QueryRequest; | 587 | struct rndis_query_request query_req; |
588 | struct rndis_set_request SetRequest; | 588 | struct rndis_set_request set_req; |
589 | struct rndis_reset_request ResetRequest; | 589 | struct rndis_reset_request reset_req; |
590 | struct rndis_keepalive_request KeepaliveRequest; | 590 | struct rndis_keepalive_request keep_alive_req; |
591 | struct rndis_indicate_status IndicateStatus; | 591 | struct rndis_indicate_status indicate_status; |
592 | struct rndis_initialize_complete InitializeComplete; | 592 | struct rndis_initialize_complete init_complete; |
593 | struct rndis_query_complete QueryComplete; | 593 | struct rndis_query_complete query_complete; |
594 | struct rndis_set_complete SetComplete; | 594 | struct rndis_set_complete set_complete; |
595 | struct rndis_reset_complete ResetComplete; | 595 | struct rndis_reset_complete reset_complete; |
596 | struct rndis_keepalive_complete KeepaliveComplete; | 596 | struct rndis_keepalive_complete keep_alive_complete; |
597 | struct rcondis_mp_create_vc CoMiniportCreateVc; | 597 | struct rcondis_mp_create_vc co_miniport_create_vc; |
598 | struct rcondis_mp_delete_vc CoMiniportDeleteVc; | 598 | struct rcondis_mp_delete_vc co_miniport_delete_vc; |
599 | struct rcondis_indicate_status CoIndicateStatus; | 599 | struct rcondis_indicate_status co_indicate_status; |
600 | struct rcondis_mp_activate_vc_request CoMiniportActivateVc; | 600 | struct rcondis_mp_activate_vc_request co_miniport_activate_vc; |
601 | struct rcondis_mp_deactivate_vc_request CoMiniportDeactivateVc; | 601 | struct rcondis_mp_deactivate_vc_request co_miniport_deactivate_vc; |
602 | struct rcondis_mp_create_vc_complete CoMiniportCreateVcComplete; | 602 | struct rcondis_mp_create_vc_complete co_miniport_create_vc_complete; |
603 | struct rcondis_mp_delete_vc_complete CoMiniportDeleteVcComplete; | 603 | struct rcondis_mp_delete_vc_complete co_miniport_delete_vc_complete; |
604 | struct rcondis_mp_activate_vc_complete CoMiniportActivateVcComplete; | 604 | struct rcondis_mp_activate_vc_complete co_miniport_activate_vc_complete; |
605 | struct rcondis_mp_deactivate_vc_complete CoMiniportDeactivateVcComplete; | 605 | struct rcondis_mp_deactivate_vc_complete |
606 | co_miniport_deactivate_vc_complete; | ||
606 | }; | 607 | }; |
607 | 608 | ||
608 | /* Remote NDIS message format */ | 609 | /* Remote NDIS message format */ |
609 | struct rndis_message { | 610 | struct rndis_message { |
610 | u32 NdisMessageType; | 611 | u32 ndis_msg_type; |
611 | 612 | ||
612 | /* Total length of this message, from the beginning */ | 613 | /* Total length of this message, from the beginning */ |
613 | /* of the sruct rndis_message, in bytes. */ | 614 | /* of the sruct rndis_message, in bytes. */ |
614 | u32 MessageLength; | 615 | u32 msg_len; |
615 | 616 | ||
616 | /* Actual message */ | 617 | /* Actual message */ |
617 | union rndis_message_container Message; | 618 | union rndis_message_container msg; |
618 | }; | 619 | }; |
619 | 620 | ||
620 | /* Handy macros */ | 621 | /* Handy macros */ |
621 | 622 | ||
622 | /* get the size of an RNDIS message. Pass in the message type, */ | 623 | /* get the size of an RNDIS message. Pass in the message type, */ |
623 | /* struct rndis_set_request, struct rndis_packet for example */ | 624 | /* struct rndis_set_request, struct rndis_packet for example */ |
624 | #define RNDIS_MESSAGE_SIZE(Message) \ | 625 | #define RNDIS_MESSAGE_SIZE(msg) \ |
625 | (sizeof(Message) + (sizeof(struct rndis_message) - \ | 626 | (sizeof(msg) + (sizeof(struct rndis_message) - \ |
626 | sizeof(union rndis_message_container))) | 627 | sizeof(union rndis_message_container))) |
627 | 628 | ||
628 | /* get pointer to info buffer with message pointer */ | 629 | /* get pointer to info buffer with message pointer */ |
629 | #define MESSAGE_TO_INFO_BUFFER(Message) \ | 630 | #define MESSAGE_TO_INFO_BUFFER(msg) \ |
630 | (((unsigned char *)(Message)) + Message->InformationBufferOffset) | 631 | (((unsigned char *)(msg)) + msg->info_buf_offset) |
631 | 632 | ||
632 | /* get pointer to status buffer with message pointer */ | 633 | /* get pointer to status buffer with message pointer */ |
633 | #define MESSAGE_TO_STATUS_BUFFER(Message) \ | 634 | #define MESSAGE_TO_STATUS_BUFFER(msg) \ |
634 | (((unsigned char *)(Message)) + Message->StatusBufferOffset) | 635 | (((unsigned char *)(msg)) + msg->status_buf_offset) |
635 | 636 | ||
636 | /* get pointer to OOBD buffer with message pointer */ | 637 | /* get pointer to OOBD buffer with message pointer */ |
637 | #define MESSAGE_TO_OOBD_BUFFER(Message) \ | 638 | #define MESSAGE_TO_OOBD_BUFFER(msg) \ |
638 | (((unsigned char *)(Message)) + Message->OOBDataOffset) | 639 | (((unsigned char *)(msg)) + msg->oob_data_offset) |
639 | 640 | ||
640 | /* get pointer to data buffer with message pointer */ | 641 | /* get pointer to data buffer with message pointer */ |
641 | #define MESSAGE_TO_DATA_BUFFER(Message) \ | 642 | #define MESSAGE_TO_DATA_BUFFER(msg) \ |
642 | (((unsigned char *)(Message)) + Message->PerPacketInfoOffset) | 643 | (((unsigned char *)(msg)) + msg->per_pkt_info_offset) |
643 | 644 | ||
644 | /* get pointer to contained message from NDIS_MESSAGE pointer */ | 645 | /* get pointer to contained message from NDIS_MESSAGE pointer */ |
645 | #define RNDIS_MESSAGE_PTR_TO_MESSAGE_PTR(RndisMessage) \ | 646 | #define RNDIS_MESSAGE_PTR_TO_MESSAGE_PTR(rndis_msg) \ |
646 | ((void *) &RndisMessage->Message) | 647 | ((void *) &rndis_msg->msg) |
647 | 648 | ||
648 | /* get pointer to contained message from NDIS_MESSAGE pointer */ | 649 | /* get pointer to contained message from NDIS_MESSAGE pointer */ |
649 | #define RNDIS_MESSAGE_RAW_PTR_TO_MESSAGE_PTR(RndisMessage) \ | 650 | #define RNDIS_MESSAGE_RAW_PTR_TO_MESSAGE_PTR(rndis_msg) \ |
650 | ((void *) RndisMessage) | 651 | ((void *) rndis_msg) |
651 | 652 | ||
652 | #endif /* _RNDIS_H_ */ | 653 | #endif /* _RNDIS_H_ */ |
diff --git a/drivers/staging/hv/rndis_filter.c b/drivers/staging/hv/rndis_filter.c index 63d24c6fadf0..53676dcbf381 100644 --- a/drivers/staging/hv/rndis_filter.c +++ b/drivers/staging/hv/rndis_filter.c | |||
@@ -136,16 +136,16 @@ static struct rndis_request *get_rndis_request(struct rndis_device *dev, | |||
136 | } | 136 | } |
137 | 137 | ||
138 | rndis_msg = &request->request_msg; | 138 | rndis_msg = &request->request_msg; |
139 | rndis_msg->NdisMessageType = msg_type; | 139 | rndis_msg->ndis_msg_type = msg_type; |
140 | rndis_msg->MessageLength = msg_len; | 140 | rndis_msg->msg_len = msg_len; |
141 | 141 | ||
142 | /* | 142 | /* |
143 | * Set the request id. This field is always after the rndis header for | 143 | * Set the request id. This field is always after the rndis header for |
144 | * request/response packet types so we just used the SetRequest as a | 144 | * request/response packet types so we just used the SetRequest as a |
145 | * template | 145 | * template |
146 | */ | 146 | */ |
147 | set = &rndis_msg->Message.SetRequest; | 147 | set = &rndis_msg->msg.set_req; |
148 | set->RequestId = atomic_inc_return(&dev->new_req_id); | 148 | set->req_id = atomic_inc_return(&dev->new_req_id); |
149 | 149 | ||
150 | /* Add to the request list */ | 150 | /* Add to the request list */ |
151 | spin_lock_irqsave(&dev->request_lock, flags); | 151 | spin_lock_irqsave(&dev->request_lock, flags); |
@@ -170,20 +170,20 @@ static void put_rndis_request(struct rndis_device *dev, | |||
170 | 170 | ||
171 | static void dump_rndis_message(struct rndis_message *rndis_msg) | 171 | static void dump_rndis_message(struct rndis_message *rndis_msg) |
172 | { | 172 | { |
173 | switch (rndis_msg->NdisMessageType) { | 173 | switch (rndis_msg->ndis_msg_type) { |
174 | case REMOTE_NDIS_PACKET_MSG: | 174 | case REMOTE_NDIS_PACKET_MSG: |
175 | DPRINT_DBG(NETVSC, "REMOTE_NDIS_PACKET_MSG (len %u, " | 175 | DPRINT_DBG(NETVSC, "REMOTE_NDIS_PACKET_MSG (len %u, " |
176 | "data offset %u data len %u, # oob %u, " | 176 | "data offset %u data len %u, # oob %u, " |
177 | "oob offset %u, oob len %u, pkt offset %u, " | 177 | "oob offset %u, oob len %u, pkt offset %u, " |
178 | "pkt len %u", | 178 | "pkt len %u", |
179 | rndis_msg->MessageLength, | 179 | rndis_msg->msg_len, |
180 | rndis_msg->Message.Packet.DataOffset, | 180 | rndis_msg->msg.pkt.data_offset, |
181 | rndis_msg->Message.Packet.DataLength, | 181 | rndis_msg->msg.pkt.data_len, |
182 | rndis_msg->Message.Packet.NumOOBDataElements, | 182 | rndis_msg->msg.pkt.num_oob_data_elements, |
183 | rndis_msg->Message.Packet.OOBDataOffset, | 183 | rndis_msg->msg.pkt.oob_data_offset, |
184 | rndis_msg->Message.Packet.OOBDataLength, | 184 | rndis_msg->msg.pkt.oob_data_len, |
185 | rndis_msg->Message.Packet.PerPacketInfoOffset, | 185 | rndis_msg->msg.pkt.per_pkt_info_offset, |
186 | rndis_msg->Message.Packet.PerPacketInfoLength); | 186 | rndis_msg->msg.pkt.per_pkt_info_len); |
187 | break; | 187 | break; |
188 | 188 | ||
189 | case REMOTE_NDIS_INITIALIZE_CMPLT: | 189 | case REMOTE_NDIS_INITIALIZE_CMPLT: |
@@ -191,53 +191,53 @@ static void dump_rndis_message(struct rndis_message *rndis_msg) | |||
191 | "(len %u, id 0x%x, status 0x%x, major %d, minor %d, " | 191 | "(len %u, id 0x%x, status 0x%x, major %d, minor %d, " |
192 | "device flags %d, max xfer size 0x%x, max pkts %u, " | 192 | "device flags %d, max xfer size 0x%x, max pkts %u, " |
193 | "pkt aligned %u)", | 193 | "pkt aligned %u)", |
194 | rndis_msg->MessageLength, | 194 | rndis_msg->msg_len, |
195 | rndis_msg->Message.InitializeComplete.RequestId, | 195 | rndis_msg->msg.init_complete.req_id, |
196 | rndis_msg->Message.InitializeComplete.Status, | 196 | rndis_msg->msg.init_complete.status, |
197 | rndis_msg->Message.InitializeComplete.MajorVersion, | 197 | rndis_msg->msg.init_complete.major_ver, |
198 | rndis_msg->Message.InitializeComplete.MinorVersion, | 198 | rndis_msg->msg.init_complete.minor_ver, |
199 | rndis_msg->Message.InitializeComplete.DeviceFlags, | 199 | rndis_msg->msg.init_complete.dev_flags, |
200 | rndis_msg->Message.InitializeComplete.MaxTransferSize, | 200 | rndis_msg->msg.init_complete.max_xfer_size, |
201 | rndis_msg->Message.InitializeComplete. | 201 | rndis_msg->msg.init_complete. |
202 | MaxPacketsPerMessage, | 202 | max_pkt_per_msg, |
203 | rndis_msg->Message.InitializeComplete. | 203 | rndis_msg->msg.init_complete. |
204 | PacketAlignmentFactor); | 204 | pkt_alignment_factor); |
205 | break; | 205 | break; |
206 | 206 | ||
207 | case REMOTE_NDIS_QUERY_CMPLT: | 207 | case REMOTE_NDIS_QUERY_CMPLT: |
208 | DPRINT_DBG(NETVSC, "REMOTE_NDIS_QUERY_CMPLT " | 208 | DPRINT_DBG(NETVSC, "REMOTE_NDIS_QUERY_CMPLT " |
209 | "(len %u, id 0x%x, status 0x%x, buf len %u, " | 209 | "(len %u, id 0x%x, status 0x%x, buf len %u, " |
210 | "buf offset %u)", | 210 | "buf offset %u)", |
211 | rndis_msg->MessageLength, | 211 | rndis_msg->msg_len, |
212 | rndis_msg->Message.QueryComplete.RequestId, | 212 | rndis_msg->msg.query_complete.req_id, |
213 | rndis_msg->Message.QueryComplete.Status, | 213 | rndis_msg->msg.query_complete.status, |
214 | rndis_msg->Message.QueryComplete. | 214 | rndis_msg->msg.query_complete. |
215 | InformationBufferLength, | 215 | info_buflen, |
216 | rndis_msg->Message.QueryComplete. | 216 | rndis_msg->msg.query_complete. |
217 | InformationBufferOffset); | 217 | info_buf_offset); |
218 | break; | 218 | break; |
219 | 219 | ||
220 | case REMOTE_NDIS_SET_CMPLT: | 220 | case REMOTE_NDIS_SET_CMPLT: |
221 | DPRINT_DBG(NETVSC, | 221 | DPRINT_DBG(NETVSC, |
222 | "REMOTE_NDIS_SET_CMPLT (len %u, id 0x%x, status 0x%x)", | 222 | "REMOTE_NDIS_SET_CMPLT (len %u, id 0x%x, status 0x%x)", |
223 | rndis_msg->MessageLength, | 223 | rndis_msg->msg_len, |
224 | rndis_msg->Message.SetComplete.RequestId, | 224 | rndis_msg->msg.set_complete.req_id, |
225 | rndis_msg->Message.SetComplete.Status); | 225 | rndis_msg->msg.set_complete.status); |
226 | break; | 226 | break; |
227 | 227 | ||
228 | case REMOTE_NDIS_INDICATE_STATUS_MSG: | 228 | case REMOTE_NDIS_INDICATE_STATUS_MSG: |
229 | DPRINT_DBG(NETVSC, "REMOTE_NDIS_INDICATE_STATUS_MSG " | 229 | DPRINT_DBG(NETVSC, "REMOTE_NDIS_INDICATE_STATUS_MSG " |
230 | "(len %u, status 0x%x, buf len %u, buf offset %u)", | 230 | "(len %u, status 0x%x, buf len %u, buf offset %u)", |
231 | rndis_msg->MessageLength, | 231 | rndis_msg->msg_len, |
232 | rndis_msg->Message.IndicateStatus.Status, | 232 | rndis_msg->msg.indicate_status.status, |
233 | rndis_msg->Message.IndicateStatus.StatusBufferLength, | 233 | rndis_msg->msg.indicate_status.status_buflen, |
234 | rndis_msg->Message.IndicateStatus.StatusBufferOffset); | 234 | rndis_msg->msg.indicate_status.status_buf_offset); |
235 | break; | 235 | break; |
236 | 236 | ||
237 | default: | 237 | default: |
238 | DPRINT_DBG(NETVSC, "0x%x (len %u)", | 238 | DPRINT_DBG(NETVSC, "0x%x (len %u)", |
239 | rndis_msg->NdisMessageType, | 239 | rndis_msg->ndis_msg_type, |
240 | rndis_msg->MessageLength); | 240 | rndis_msg->msg_len); |
241 | break; | 241 | break; |
242 | } | 242 | } |
243 | } | 243 | } |
@@ -252,12 +252,12 @@ static int rndis_filter_send_request(struct rndis_device *dev, | |||
252 | packet = &req->pkt; | 252 | packet = &req->pkt; |
253 | 253 | ||
254 | packet->is_data_pkt = false; | 254 | packet->is_data_pkt = false; |
255 | packet->total_data_buflen = req->request_msg.MessageLength; | 255 | packet->total_data_buflen = req->request_msg.msg_len; |
256 | packet->page_buf_cnt = 1; | 256 | packet->page_buf_cnt = 1; |
257 | 257 | ||
258 | packet->page_buf[0].Pfn = virt_to_phys(&req->request_msg) >> | 258 | packet->page_buf[0].Pfn = virt_to_phys(&req->request_msg) >> |
259 | PAGE_SHIFT; | 259 | PAGE_SHIFT; |
260 | packet->page_buf[0].Length = req->request_msg.MessageLength; | 260 | packet->page_buf[0].Length = req->request_msg.msg_len; |
261 | packet->page_buf[0].Offset = | 261 | packet->page_buf[0].Offset = |
262 | (unsigned long)&req->request_msg & (PAGE_SIZE - 1); | 262 | (unsigned long)&req->request_msg & (PAGE_SIZE - 1); |
263 | 263 | ||
@@ -283,15 +283,15 @@ static void rndis_filter_receive_response(struct rndis_device *dev, | |||
283 | * All request/response message contains RequestId as the 1st | 283 | * All request/response message contains RequestId as the 1st |
284 | * field | 284 | * field |
285 | */ | 285 | */ |
286 | if (request->request_msg.Message.InitializeRequest.RequestId | 286 | if (request->request_msg.msg.init_req.req_id |
287 | == resp->Message.InitializeComplete.RequestId) { | 287 | == resp->msg.init_complete.req_id) { |
288 | DPRINT_DBG(NETVSC, "found rndis request for " | 288 | DPRINT_DBG(NETVSC, "found rndis request for " |
289 | "this response (id 0x%x req type 0x%x res " | 289 | "this response (id 0x%x req type 0x%x res " |
290 | "type 0x%x)", | 290 | "type 0x%x)", |
291 | request->request_msg.Message. | 291 | request->request_msg.msg. |
292 | InitializeRequest.RequestId, | 292 | init_req.req_id, |
293 | request->request_msg.NdisMessageType, | 293 | request->request_msg.ndis_msg_type, |
294 | resp->NdisMessageType); | 294 | resp->ndis_msg_type); |
295 | 295 | ||
296 | found = true; | 296 | found = true; |
297 | break; | 297 | break; |
@@ -300,23 +300,23 @@ static void rndis_filter_receive_response(struct rndis_device *dev, | |||
300 | spin_unlock_irqrestore(&dev->request_lock, flags); | 300 | spin_unlock_irqrestore(&dev->request_lock, flags); |
301 | 301 | ||
302 | if (found) { | 302 | if (found) { |
303 | if (resp->MessageLength <= sizeof(struct rndis_message)) { | 303 | if (resp->msg_len <= sizeof(struct rndis_message)) { |
304 | memcpy(&request->response_msg, resp, | 304 | memcpy(&request->response_msg, resp, |
305 | resp->MessageLength); | 305 | resp->msg_len); |
306 | } else { | 306 | } else { |
307 | DPRINT_ERR(NETVSC, "rndis response buffer overflow " | 307 | DPRINT_ERR(NETVSC, "rndis response buffer overflow " |
308 | "detected (size %u max %zu)", | 308 | "detected (size %u max %zu)", |
309 | resp->MessageLength, | 309 | resp->msg_len, |
310 | sizeof(struct rndis_filter_packet)); | 310 | sizeof(struct rndis_filter_packet)); |
311 | 311 | ||
312 | if (resp->NdisMessageType == | 312 | if (resp->ndis_msg_type == |
313 | REMOTE_NDIS_RESET_CMPLT) { | 313 | REMOTE_NDIS_RESET_CMPLT) { |
314 | /* does not have a request id field */ | 314 | /* does not have a request id field */ |
315 | request->response_msg.Message.ResetComplete. | 315 | request->response_msg.msg.reset_complete. |
316 | Status = STATUS_BUFFER_OVERFLOW; | 316 | status = STATUS_BUFFER_OVERFLOW; |
317 | } else { | 317 | } else { |
318 | request->response_msg.Message. | 318 | request->response_msg.msg. |
319 | InitializeComplete.Status = | 319 | init_complete.status = |
320 | STATUS_BUFFER_OVERFLOW; | 320 | STATUS_BUFFER_OVERFLOW; |
321 | } | 321 | } |
322 | } | 322 | } |
@@ -325,8 +325,8 @@ static void rndis_filter_receive_response(struct rndis_device *dev, | |||
325 | } else { | 325 | } else { |
326 | DPRINT_ERR(NETVSC, "no rndis request found for this response " | 326 | DPRINT_ERR(NETVSC, "no rndis request found for this response " |
327 | "(id 0x%x res type 0x%x)", | 327 | "(id 0x%x res type 0x%x)", |
328 | resp->Message.InitializeComplete.RequestId, | 328 | resp->msg.init_complete.req_id, |
329 | resp->NdisMessageType); | 329 | resp->ndis_msg_type); |
330 | } | 330 | } |
331 | } | 331 | } |
332 | 332 | ||
@@ -334,12 +334,12 @@ static void rndis_filter_receive_indicate_status(struct rndis_device *dev, | |||
334 | struct rndis_message *resp) | 334 | struct rndis_message *resp) |
335 | { | 335 | { |
336 | struct rndis_indicate_status *indicate = | 336 | struct rndis_indicate_status *indicate = |
337 | &resp->Message.IndicateStatus; | 337 | &resp->msg.indicate_status; |
338 | 338 | ||
339 | if (indicate->Status == RNDIS_STATUS_MEDIA_CONNECT) { | 339 | if (indicate->status == RNDIS_STATUS_MEDIA_CONNECT) { |
340 | rndis_filter.inner_drv.link_status_change( | 340 | rndis_filter.inner_drv.link_status_change( |
341 | dev->net_dev->dev, 1); | 341 | dev->net_dev->dev, 1); |
342 | } else if (indicate->Status == RNDIS_STATUS_MEDIA_DISCONNECT) { | 342 | } else if (indicate->status == RNDIS_STATUS_MEDIA_DISCONNECT) { |
343 | rndis_filter.inner_drv.link_status_change( | 343 | rndis_filter.inner_drv.link_status_change( |
344 | dev->net_dev->dev, 0); | 344 | dev->net_dev->dev, 0); |
345 | } else { | 345 | } else { |
@@ -360,7 +360,7 @@ static void rndis_filter_receive_data(struct rndis_device *dev, | |||
360 | /* ASSERT(Packet->PageBuffers[0].Length > */ | 360 | /* ASSERT(Packet->PageBuffers[0].Length > */ |
361 | /* RNDIS_MESSAGE_SIZE(struct rndis_packet)); */ | 361 | /* RNDIS_MESSAGE_SIZE(struct rndis_packet)); */ |
362 | 362 | ||
363 | rndis_pkt = &msg->Message.Packet; | 363 | rndis_pkt = &msg->msg.pkt; |
364 | 364 | ||
365 | /* | 365 | /* |
366 | * FIXME: Handle multiple rndis pkt msgs that maybe enclosed in this | 366 | * FIXME: Handle multiple rndis pkt msgs that maybe enclosed in this |
@@ -368,7 +368,7 @@ static void rndis_filter_receive_data(struct rndis_device *dev, | |||
368 | */ | 368 | */ |
369 | 369 | ||
370 | /* Remove the rndis header and pass it back up the stack */ | 370 | /* Remove the rndis header and pass it back up the stack */ |
371 | data_offset = RNDIS_HEADER_SIZE + rndis_pkt->DataOffset; | 371 | data_offset = RNDIS_HEADER_SIZE + rndis_pkt->data_offset; |
372 | 372 | ||
373 | pkt->total_data_buflen -= data_offset; | 373 | pkt->total_data_buflen -= data_offset; |
374 | pkt->page_buf[0].Offset += data_offset; | 374 | pkt->page_buf[0].Offset += data_offset; |
@@ -418,36 +418,36 @@ static int rndis_filter_receive(struct hv_device *dev, | |||
418 | * range shows 52 bytes | 418 | * range shows 52 bytes |
419 | * */ | 419 | * */ |
420 | #if 0 | 420 | #if 0 |
421 | if (pkt->total_data_buflen != rndis_hdr->MessageLength) { | 421 | if (pkt->total_data_buflen != rndis_hdr->msg_len) { |
422 | kunmap_atomic(rndis_hdr - pkt->page_buf[0].Offset, | 422 | kunmap_atomic(rndis_hdr - pkt->page_buf[0].Offset, |
423 | KM_IRQ0); | 423 | KM_IRQ0); |
424 | 424 | ||
425 | DPRINT_ERR(NETVSC, "invalid rndis message? (expected %u " | 425 | DPRINT_ERR(NETVSC, "invalid rndis message? (expected %u " |
426 | "bytes got %u)...dropping this message!", | 426 | "bytes got %u)...dropping this message!", |
427 | rndis_hdr->MessageLength, | 427 | rndis_hdr->msg_len, |
428 | pkt->total_data_buflen); | 428 | pkt->total_data_buflen); |
429 | return -1; | 429 | return -1; |
430 | } | 430 | } |
431 | #endif | 431 | #endif |
432 | 432 | ||
433 | if ((rndis_hdr->NdisMessageType != REMOTE_NDIS_PACKET_MSG) && | 433 | if ((rndis_hdr->ndis_msg_type != REMOTE_NDIS_PACKET_MSG) && |
434 | (rndis_hdr->MessageLength > sizeof(struct rndis_message))) { | 434 | (rndis_hdr->msg_len > sizeof(struct rndis_message))) { |
435 | DPRINT_ERR(NETVSC, "incoming rndis message buffer overflow " | 435 | DPRINT_ERR(NETVSC, "incoming rndis message buffer overflow " |
436 | "detected (got %u, max %zu)...marking it an error!", | 436 | "detected (got %u, max %zu)...marking it an error!", |
437 | rndis_hdr->MessageLength, | 437 | rndis_hdr->msg_len, |
438 | sizeof(struct rndis_message)); | 438 | sizeof(struct rndis_message)); |
439 | } | 439 | } |
440 | 440 | ||
441 | memcpy(&rndis_msg, rndis_hdr, | 441 | memcpy(&rndis_msg, rndis_hdr, |
442 | (rndis_hdr->MessageLength > sizeof(struct rndis_message)) ? | 442 | (rndis_hdr->msg_len > sizeof(struct rndis_message)) ? |
443 | sizeof(struct rndis_message) : | 443 | sizeof(struct rndis_message) : |
444 | rndis_hdr->MessageLength); | 444 | rndis_hdr->msg_len); |
445 | 445 | ||
446 | kunmap_atomic(rndis_hdr - pkt->page_buf[0].Offset, KM_IRQ0); | 446 | kunmap_atomic(rndis_hdr - pkt->page_buf[0].Offset, KM_IRQ0); |
447 | 447 | ||
448 | dump_rndis_message(&rndis_msg); | 448 | dump_rndis_message(&rndis_msg); |
449 | 449 | ||
450 | switch (rndis_msg.NdisMessageType) { | 450 | switch (rndis_msg.ndis_msg_type) { |
451 | case REMOTE_NDIS_PACKET_MSG: | 451 | case REMOTE_NDIS_PACKET_MSG: |
452 | /* data msg */ | 452 | /* data msg */ |
453 | rndis_filter_receive_data(rndis_dev, &rndis_msg, pkt); | 453 | rndis_filter_receive_data(rndis_dev, &rndis_msg, pkt); |
@@ -468,8 +468,8 @@ static int rndis_filter_receive(struct hv_device *dev, | |||
468 | break; | 468 | break; |
469 | default: | 469 | default: |
470 | DPRINT_ERR(NETVSC, "unhandled rndis message (type %u len %u)", | 470 | DPRINT_ERR(NETVSC, "unhandled rndis message (type %u len %u)", |
471 | rndis_msg.NdisMessageType, | 471 | rndis_msg.ndis_msg_type, |
472 | rndis_msg.MessageLength); | 472 | rndis_msg.msg_len); |
473 | break; | 473 | break; |
474 | } | 474 | } |
475 | 475 | ||
@@ -497,11 +497,11 @@ static int rndis_filter_query_device(struct rndis_device *dev, u32 oid, | |||
497 | } | 497 | } |
498 | 498 | ||
499 | /* Setup the rndis query */ | 499 | /* Setup the rndis query */ |
500 | query = &request->request_msg.Message.QueryRequest; | 500 | query = &request->request_msg.msg.query_req; |
501 | query->Oid = oid; | 501 | query->oid = oid; |
502 | query->InformationBufferOffset = sizeof(struct rndis_query_request); | 502 | query->info_buf_offset = sizeof(struct rndis_query_request); |
503 | query->InformationBufferLength = 0; | 503 | query->info_buflen = 0; |
504 | query->DeviceVcHandle = 0; | 504 | query->dev_vc_handle = 0; |
505 | 505 | ||
506 | ret = rndis_filter_send_request(dev, request); | 506 | ret = rndis_filter_send_request(dev, request); |
507 | if (ret != 0) | 507 | if (ret != 0) |
@@ -510,19 +510,19 @@ static int rndis_filter_query_device(struct rndis_device *dev, u32 oid, | |||
510 | osd_waitevent_wait(request->waitevent); | 510 | osd_waitevent_wait(request->waitevent); |
511 | 511 | ||
512 | /* Copy the response back */ | 512 | /* Copy the response back */ |
513 | query_complete = &request->response_msg.Message.QueryComplete; | 513 | query_complete = &request->response_msg.msg.query_complete; |
514 | 514 | ||
515 | if (query_complete->InformationBufferLength > inresult_size) { | 515 | if (query_complete->info_buflen > inresult_size) { |
516 | ret = -1; | 516 | ret = -1; |
517 | goto Cleanup; | 517 | goto Cleanup; |
518 | } | 518 | } |
519 | 519 | ||
520 | memcpy(result, | 520 | memcpy(result, |
521 | (void *)((unsigned long)query_complete + | 521 | (void *)((unsigned long)query_complete + |
522 | query_complete->InformationBufferOffset), | 522 | query_complete->info_buf_offset), |
523 | query_complete->InformationBufferLength); | 523 | query_complete->info_buflen); |
524 | 524 | ||
525 | *result_size = query_complete->InformationBufferLength; | 525 | *result_size = query_complete->info_buflen; |
526 | 526 | ||
527 | Cleanup: | 527 | Cleanup: |
528 | if (request) | 528 | if (request) |
@@ -570,10 +570,10 @@ static int rndis_filter_set_packet_filter(struct rndis_device *dev, | |||
570 | } | 570 | } |
571 | 571 | ||
572 | /* Setup the rndis set */ | 572 | /* Setup the rndis set */ |
573 | set = &request->request_msg.Message.SetRequest; | 573 | set = &request->request_msg.msg.set_req; |
574 | set->Oid = RNDIS_OID_GEN_CURRENT_PACKET_FILTER; | 574 | set->oid = RNDIS_OID_GEN_CURRENT_PACKET_FILTER; |
575 | set->InformationBufferLength = sizeof(u32); | 575 | set->info_buflen = sizeof(u32); |
576 | set->InformationBufferOffset = sizeof(struct rndis_set_request); | 576 | set->info_buf_offset = sizeof(struct rndis_set_request); |
577 | 577 | ||
578 | memcpy((void *)(unsigned long)set + sizeof(struct rndis_set_request), | 578 | memcpy((void *)(unsigned long)set + sizeof(struct rndis_set_request), |
579 | &new_filter, sizeof(u32)); | 579 | &new_filter, sizeof(u32)); |
@@ -594,8 +594,8 @@ static int rndis_filter_set_packet_filter(struct rndis_device *dev, | |||
594 | } else { | 594 | } else { |
595 | if (ret > 0) | 595 | if (ret > 0) |
596 | ret = 0; | 596 | ret = 0; |
597 | set_complete = &request->response_msg.Message.SetComplete; | 597 | set_complete = &request->response_msg.msg.set_complete; |
598 | status = set_complete->Status; | 598 | status = set_complete->status; |
599 | } | 599 | } |
600 | 600 | ||
601 | Cleanup: | 601 | Cleanup: |
@@ -661,11 +661,11 @@ static int rndis_filter_init_device(struct rndis_device *dev) | |||
661 | } | 661 | } |
662 | 662 | ||
663 | /* Setup the rndis set */ | 663 | /* Setup the rndis set */ |
664 | init = &request->request_msg.Message.InitializeRequest; | 664 | init = &request->request_msg.msg.init_req; |
665 | init->MajorVersion = RNDIS_MAJOR_VERSION; | 665 | init->major_ver = RNDIS_MAJOR_VERSION; |
666 | init->MinorVersion = RNDIS_MINOR_VERSION; | 666 | init->minor_ver = RNDIS_MINOR_VERSION; |
667 | /* FIXME: Use 1536 - rounded ethernet frame size */ | 667 | /* FIXME: Use 1536 - rounded ethernet frame size */ |
668 | init->MaxTransferSize = 2048; | 668 | init->max_xfer_size = 2048; |
669 | 669 | ||
670 | dev->state = RNDIS_DEV_INITIALIZING; | 670 | dev->state = RNDIS_DEV_INITIALIZING; |
671 | 671 | ||
@@ -677,8 +677,8 @@ static int rndis_filter_init_device(struct rndis_device *dev) | |||
677 | 677 | ||
678 | osd_waitevent_wait(request->waitevent); | 678 | osd_waitevent_wait(request->waitevent); |
679 | 679 | ||
680 | init_complete = &request->response_msg.Message.InitializeComplete; | 680 | init_complete = &request->response_msg.msg.init_complete; |
681 | status = init_complete->Status; | 681 | status = init_complete->status; |
682 | if (status == RNDIS_STATUS_SUCCESS) { | 682 | if (status == RNDIS_STATUS_SUCCESS) { |
683 | dev->state = RNDIS_DEV_INITIALIZED; | 683 | dev->state = RNDIS_DEV_INITIALIZED; |
684 | ret = 0; | 684 | ret = 0; |
@@ -706,8 +706,8 @@ static void rndis_filter_halt_device(struct rndis_device *dev) | |||
706 | goto Cleanup; | 706 | goto Cleanup; |
707 | 707 | ||
708 | /* Setup the rndis set */ | 708 | /* Setup the rndis set */ |
709 | halt = &request->request_msg.Message.HaltRequest; | 709 | halt = &request->request_msg.msg.halt_req; |
710 | halt->RequestId = atomic_inc_return(&dev->new_req_id); | 710 | halt->req_id = atomic_inc_return(&dev->new_req_id); |
711 | 711 | ||
712 | /* Ignore return since this msg is optional. */ | 712 | /* Ignore return since this msg is optional. */ |
713 | rndis_filter_send_request(dev, request); | 713 | rndis_filter_send_request(dev, request); |
@@ -875,13 +875,13 @@ static int rndis_filter_send(struct hv_device *dev, | |||
875 | rndisMessage = &filterPacket->msg; | 875 | rndisMessage = &filterPacket->msg; |
876 | rndisMessageSize = RNDIS_MESSAGE_SIZE(struct rndis_packet); | 876 | rndisMessageSize = RNDIS_MESSAGE_SIZE(struct rndis_packet); |
877 | 877 | ||
878 | rndisMessage->NdisMessageType = REMOTE_NDIS_PACKET_MSG; | 878 | rndisMessage->ndis_msg_type = REMOTE_NDIS_PACKET_MSG; |
879 | rndisMessage->MessageLength = pkt->total_data_buflen + | 879 | rndisMessage->msg_len = pkt->total_data_buflen + |
880 | rndisMessageSize; | 880 | rndisMessageSize; |
881 | 881 | ||
882 | rndisPacket = &rndisMessage->Message.Packet; | 882 | rndisPacket = &rndisMessage->msg.pkt; |
883 | rndisPacket->DataOffset = sizeof(struct rndis_packet); | 883 | rndisPacket->data_offset = sizeof(struct rndis_packet); |
884 | rndisPacket->DataLength = pkt->total_data_buflen; | 884 | rndisPacket->data_len = pkt->total_data_buflen; |
885 | 885 | ||
886 | pkt->is_data_pkt = true; | 886 | pkt->is_data_pkt = true; |
887 | pkt->page_buf[0].Pfn = virt_to_phys(rndisMessage) >> PAGE_SHIFT; | 887 | pkt->page_buf[0].Pfn = virt_to_phys(rndisMessage) >> PAGE_SHIFT; |