diff options
Diffstat (limited to 'drivers/usb/gadget/rndis.c')
| -rw-r--r-- | drivers/usb/gadget/rndis.c | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 3d036647431f..bd58dd504f6f 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c | |||
| @@ -204,7 +204,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 204 | 204 | ||
| 205 | /* mandatory */ | 205 | /* mandatory */ |
| 206 | case OID_GEN_SUPPORTED_LIST: | 206 | case OID_GEN_SUPPORTED_LIST: |
| 207 | DBG("%s: OID_GEN_SUPPORTED_LIST\n", __FUNCTION__); | 207 | DBG("%s: OID_GEN_SUPPORTED_LIST\n", __func__); |
| 208 | length = sizeof (oid_supported_list); | 208 | length = sizeof (oid_supported_list); |
| 209 | count = length / sizeof (u32); | 209 | count = length / sizeof (u32); |
| 210 | for (i = 0; i < count; i++) | 210 | for (i = 0; i < count; i++) |
| @@ -214,7 +214,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 214 | 214 | ||
| 215 | /* mandatory */ | 215 | /* mandatory */ |
| 216 | case OID_GEN_HARDWARE_STATUS: | 216 | case OID_GEN_HARDWARE_STATUS: |
| 217 | DBG("%s: OID_GEN_HARDWARE_STATUS\n", __FUNCTION__); | 217 | DBG("%s: OID_GEN_HARDWARE_STATUS\n", __func__); |
| 218 | /* Bogus question! | 218 | /* Bogus question! |
| 219 | * Hardware must be ready to receive high level protocols. | 219 | * Hardware must be ready to receive high level protocols. |
| 220 | * BTW: | 220 | * BTW: |
| @@ -227,14 +227,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 227 | 227 | ||
| 228 | /* mandatory */ | 228 | /* mandatory */ |
| 229 | case OID_GEN_MEDIA_SUPPORTED: | 229 | case OID_GEN_MEDIA_SUPPORTED: |
| 230 | DBG("%s: OID_GEN_MEDIA_SUPPORTED\n", __FUNCTION__); | 230 | DBG("%s: OID_GEN_MEDIA_SUPPORTED\n", __func__); |
| 231 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium); | 231 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium); |
| 232 | retval = 0; | 232 | retval = 0; |
| 233 | break; | 233 | break; |
| 234 | 234 | ||
| 235 | /* mandatory */ | 235 | /* mandatory */ |
| 236 | case OID_GEN_MEDIA_IN_USE: | 236 | case OID_GEN_MEDIA_IN_USE: |
| 237 | DBG("%s: OID_GEN_MEDIA_IN_USE\n", __FUNCTION__); | 237 | DBG("%s: OID_GEN_MEDIA_IN_USE\n", __func__); |
| 238 | /* one medium, one transport... (maybe you do it better) */ | 238 | /* one medium, one transport... (maybe you do it better) */ |
| 239 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium); | 239 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium); |
| 240 | retval = 0; | 240 | retval = 0; |
| @@ -242,7 +242,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 242 | 242 | ||
| 243 | /* mandatory */ | 243 | /* mandatory */ |
| 244 | case OID_GEN_MAXIMUM_FRAME_SIZE: | 244 | case OID_GEN_MAXIMUM_FRAME_SIZE: |
| 245 | DBG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __FUNCTION__); | 245 | DBG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __func__); |
| 246 | if (rndis_per_dev_params [configNr].dev) { | 246 | if (rndis_per_dev_params [configNr].dev) { |
| 247 | *outbuf = cpu_to_le32 ( | 247 | *outbuf = cpu_to_le32 ( |
| 248 | rndis_per_dev_params [configNr].dev->mtu); | 248 | rndis_per_dev_params [configNr].dev->mtu); |
| @@ -253,7 +253,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 253 | /* mandatory */ | 253 | /* mandatory */ |
| 254 | case OID_GEN_LINK_SPEED: | 254 | case OID_GEN_LINK_SPEED: |
| 255 | if (rndis_debug > 1) | 255 | if (rndis_debug > 1) |
| 256 | DBG("%s: OID_GEN_LINK_SPEED\n", __FUNCTION__); | 256 | DBG("%s: OID_GEN_LINK_SPEED\n", __func__); |
| 257 | if (rndis_per_dev_params [configNr].media_state | 257 | if (rndis_per_dev_params [configNr].media_state |
| 258 | == NDIS_MEDIA_STATE_DISCONNECTED) | 258 | == NDIS_MEDIA_STATE_DISCONNECTED) |
| 259 | *outbuf = __constant_cpu_to_le32 (0); | 259 | *outbuf = __constant_cpu_to_le32 (0); |
| @@ -265,7 +265,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 265 | 265 | ||
| 266 | /* mandatory */ | 266 | /* mandatory */ |
| 267 | case OID_GEN_TRANSMIT_BLOCK_SIZE: | 267 | case OID_GEN_TRANSMIT_BLOCK_SIZE: |
| 268 | DBG("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __FUNCTION__); | 268 | DBG("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __func__); |
| 269 | if (rndis_per_dev_params [configNr].dev) { | 269 | if (rndis_per_dev_params [configNr].dev) { |
| 270 | *outbuf = cpu_to_le32 ( | 270 | *outbuf = cpu_to_le32 ( |
| 271 | rndis_per_dev_params [configNr].dev->mtu); | 271 | rndis_per_dev_params [configNr].dev->mtu); |
| @@ -275,7 +275,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 275 | 275 | ||
| 276 | /* mandatory */ | 276 | /* mandatory */ |
| 277 | case OID_GEN_RECEIVE_BLOCK_SIZE: | 277 | case OID_GEN_RECEIVE_BLOCK_SIZE: |
| 278 | DBG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __FUNCTION__); | 278 | DBG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __func__); |
| 279 | if (rndis_per_dev_params [configNr].dev) { | 279 | if (rndis_per_dev_params [configNr].dev) { |
| 280 | *outbuf = cpu_to_le32 ( | 280 | *outbuf = cpu_to_le32 ( |
| 281 | rndis_per_dev_params [configNr].dev->mtu); | 281 | rndis_per_dev_params [configNr].dev->mtu); |
| @@ -285,7 +285,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 285 | 285 | ||
| 286 | /* mandatory */ | 286 | /* mandatory */ |
| 287 | case OID_GEN_VENDOR_ID: | 287 | case OID_GEN_VENDOR_ID: |
| 288 | DBG("%s: OID_GEN_VENDOR_ID\n", __FUNCTION__); | 288 | DBG("%s: OID_GEN_VENDOR_ID\n", __func__); |
| 289 | *outbuf = cpu_to_le32 ( | 289 | *outbuf = cpu_to_le32 ( |
| 290 | rndis_per_dev_params [configNr].vendorID); | 290 | rndis_per_dev_params [configNr].vendorID); |
| 291 | retval = 0; | 291 | retval = 0; |
| @@ -293,7 +293,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 293 | 293 | ||
| 294 | /* mandatory */ | 294 | /* mandatory */ |
| 295 | case OID_GEN_VENDOR_DESCRIPTION: | 295 | case OID_GEN_VENDOR_DESCRIPTION: |
| 296 | DBG("%s: OID_GEN_VENDOR_DESCRIPTION\n", __FUNCTION__); | 296 | DBG("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__); |
| 297 | length = strlen (rndis_per_dev_params [configNr].vendorDescr); | 297 | length = strlen (rndis_per_dev_params [configNr].vendorDescr); |
| 298 | memcpy (outbuf, | 298 | memcpy (outbuf, |
| 299 | rndis_per_dev_params [configNr].vendorDescr, length); | 299 | rndis_per_dev_params [configNr].vendorDescr, length); |
| @@ -301,7 +301,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 301 | break; | 301 | break; |
| 302 | 302 | ||
| 303 | case OID_GEN_VENDOR_DRIVER_VERSION: | 303 | case OID_GEN_VENDOR_DRIVER_VERSION: |
| 304 | DBG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __FUNCTION__); | 304 | DBG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __func__); |
| 305 | /* Created as LE */ | 305 | /* Created as LE */ |
| 306 | *outbuf = rndis_driver_version; | 306 | *outbuf = rndis_driver_version; |
| 307 | retval = 0; | 307 | retval = 0; |
| @@ -309,14 +309,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 309 | 309 | ||
| 310 | /* mandatory */ | 310 | /* mandatory */ |
| 311 | case OID_GEN_CURRENT_PACKET_FILTER: | 311 | case OID_GEN_CURRENT_PACKET_FILTER: |
| 312 | DBG("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __FUNCTION__); | 312 | DBG("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __func__); |
| 313 | *outbuf = cpu_to_le32 (*rndis_per_dev_params[configNr].filter); | 313 | *outbuf = cpu_to_le32 (*rndis_per_dev_params[configNr].filter); |
| 314 | retval = 0; | 314 | retval = 0; |
| 315 | break; | 315 | break; |
| 316 | 316 | ||
| 317 | /* mandatory */ | 317 | /* mandatory */ |
| 318 | case OID_GEN_MAXIMUM_TOTAL_SIZE: | 318 | case OID_GEN_MAXIMUM_TOTAL_SIZE: |
| 319 | DBG("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __FUNCTION__); | 319 | DBG("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __func__); |
| 320 | *outbuf = __constant_cpu_to_le32(RNDIS_MAX_TOTAL_SIZE); | 320 | *outbuf = __constant_cpu_to_le32(RNDIS_MAX_TOTAL_SIZE); |
| 321 | retval = 0; | 321 | retval = 0; |
| 322 | break; | 322 | break; |
| @@ -324,14 +324,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 324 | /* mandatory */ | 324 | /* mandatory */ |
| 325 | case OID_GEN_MEDIA_CONNECT_STATUS: | 325 | case OID_GEN_MEDIA_CONNECT_STATUS: |
| 326 | if (rndis_debug > 1) | 326 | if (rndis_debug > 1) |
| 327 | DBG("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __FUNCTION__); | 327 | DBG("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __func__); |
| 328 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 328 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 329 | .media_state); | 329 | .media_state); |
| 330 | retval = 0; | 330 | retval = 0; |
| 331 | break; | 331 | break; |
| 332 | 332 | ||
| 333 | case OID_GEN_PHYSICAL_MEDIUM: | 333 | case OID_GEN_PHYSICAL_MEDIUM: |
| 334 | DBG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __FUNCTION__); | 334 | DBG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __func__); |
| 335 | *outbuf = __constant_cpu_to_le32 (0); | 335 | *outbuf = __constant_cpu_to_le32 (0); |
| 336 | retval = 0; | 336 | retval = 0; |
| 337 | break; | 337 | break; |
| @@ -341,7 +341,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 341 | * versions emit undefined RNDIS messages. DOCUMENT ALL THESE! | 341 | * versions emit undefined RNDIS messages. DOCUMENT ALL THESE! |
| 342 | */ | 342 | */ |
| 343 | case OID_GEN_MAC_OPTIONS: /* from WinME */ | 343 | case OID_GEN_MAC_OPTIONS: /* from WinME */ |
| 344 | DBG("%s: OID_GEN_MAC_OPTIONS\n", __FUNCTION__); | 344 | DBG("%s: OID_GEN_MAC_OPTIONS\n", __func__); |
| 345 | *outbuf = __constant_cpu_to_le32( | 345 | *outbuf = __constant_cpu_to_le32( |
| 346 | NDIS_MAC_OPTION_RECEIVE_SERIALIZED | 346 | NDIS_MAC_OPTION_RECEIVE_SERIALIZED |
| 347 | | NDIS_MAC_OPTION_FULL_DUPLEX); | 347 | | NDIS_MAC_OPTION_FULL_DUPLEX); |
| @@ -353,7 +353,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 353 | /* mandatory */ | 353 | /* mandatory */ |
| 354 | case OID_GEN_XMIT_OK: | 354 | case OID_GEN_XMIT_OK: |
| 355 | if (rndis_debug > 1) | 355 | if (rndis_debug > 1) |
| 356 | DBG("%s: OID_GEN_XMIT_OK\n", __FUNCTION__); | 356 | DBG("%s: OID_GEN_XMIT_OK\n", __func__); |
| 357 | if (rndis_per_dev_params [configNr].stats) { | 357 | if (rndis_per_dev_params [configNr].stats) { |
| 358 | *outbuf = cpu_to_le32 ( | 358 | *outbuf = cpu_to_le32 ( |
| 359 | rndis_per_dev_params [configNr].stats->tx_packets - | 359 | rndis_per_dev_params [configNr].stats->tx_packets - |
| @@ -366,7 +366,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 366 | /* mandatory */ | 366 | /* mandatory */ |
| 367 | case OID_GEN_RCV_OK: | 367 | case OID_GEN_RCV_OK: |
| 368 | if (rndis_debug > 1) | 368 | if (rndis_debug > 1) |
| 369 | DBG("%s: OID_GEN_RCV_OK\n", __FUNCTION__); | 369 | DBG("%s: OID_GEN_RCV_OK\n", __func__); |
| 370 | if (rndis_per_dev_params [configNr].stats) { | 370 | if (rndis_per_dev_params [configNr].stats) { |
| 371 | *outbuf = cpu_to_le32 ( | 371 | *outbuf = cpu_to_le32 ( |
| 372 | rndis_per_dev_params [configNr].stats->rx_packets - | 372 | rndis_per_dev_params [configNr].stats->rx_packets - |
| @@ -379,7 +379,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 379 | /* mandatory */ | 379 | /* mandatory */ |
| 380 | case OID_GEN_XMIT_ERROR: | 380 | case OID_GEN_XMIT_ERROR: |
| 381 | if (rndis_debug > 1) | 381 | if (rndis_debug > 1) |
| 382 | DBG("%s: OID_GEN_XMIT_ERROR\n", __FUNCTION__); | 382 | DBG("%s: OID_GEN_XMIT_ERROR\n", __func__); |
| 383 | if (rndis_per_dev_params [configNr].stats) { | 383 | if (rndis_per_dev_params [configNr].stats) { |
| 384 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 384 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 385 | .stats->tx_errors); | 385 | .stats->tx_errors); |
| @@ -390,7 +390,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 390 | /* mandatory */ | 390 | /* mandatory */ |
| 391 | case OID_GEN_RCV_ERROR: | 391 | case OID_GEN_RCV_ERROR: |
| 392 | if (rndis_debug > 1) | 392 | if (rndis_debug > 1) |
| 393 | DBG("%s: OID_GEN_RCV_ERROR\n", __FUNCTION__); | 393 | DBG("%s: OID_GEN_RCV_ERROR\n", __func__); |
| 394 | if (rndis_per_dev_params [configNr].stats) { | 394 | if (rndis_per_dev_params [configNr].stats) { |
| 395 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 395 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 396 | .stats->rx_errors); | 396 | .stats->rx_errors); |
| @@ -400,7 +400,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 400 | 400 | ||
| 401 | /* mandatory */ | 401 | /* mandatory */ |
| 402 | case OID_GEN_RCV_NO_BUFFER: | 402 | case OID_GEN_RCV_NO_BUFFER: |
| 403 | DBG("%s: OID_GEN_RCV_NO_BUFFER\n", __FUNCTION__); | 403 | DBG("%s: OID_GEN_RCV_NO_BUFFER\n", __func__); |
| 404 | if (rndis_per_dev_params [configNr].stats) { | 404 | if (rndis_per_dev_params [configNr].stats) { |
| 405 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 405 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 406 | .stats->rx_dropped); | 406 | .stats->rx_dropped); |
| @@ -410,7 +410,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 410 | 410 | ||
| 411 | #ifdef RNDIS_OPTIONAL_STATS | 411 | #ifdef RNDIS_OPTIONAL_STATS |
| 412 | case OID_GEN_DIRECTED_BYTES_XMIT: | 412 | case OID_GEN_DIRECTED_BYTES_XMIT: |
| 413 | DBG("%s: OID_GEN_DIRECTED_BYTES_XMIT\n", __FUNCTION__); | 413 | DBG("%s: OID_GEN_DIRECTED_BYTES_XMIT\n", __func__); |
| 414 | /* | 414 | /* |
| 415 | * Aunt Tilly's size of shoes | 415 | * Aunt Tilly's size of shoes |
| 416 | * minus antarctica count of penguins | 416 | * minus antarctica count of penguins |
| @@ -430,7 +430,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 430 | break; | 430 | break; |
| 431 | 431 | ||
| 432 | case OID_GEN_DIRECTED_FRAMES_XMIT: | 432 | case OID_GEN_DIRECTED_FRAMES_XMIT: |
| 433 | DBG("%s: OID_GEN_DIRECTED_FRAMES_XMIT\n", __FUNCTION__); | 433 | DBG("%s: OID_GEN_DIRECTED_FRAMES_XMIT\n", __func__); |
| 434 | /* dito */ | 434 | /* dito */ |
| 435 | if (rndis_per_dev_params [configNr].stats) { | 435 | if (rndis_per_dev_params [configNr].stats) { |
| 436 | *outbuf = cpu_to_le32 ( | 436 | *outbuf = cpu_to_le32 ( |
| @@ -446,7 +446,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 446 | break; | 446 | break; |
| 447 | 447 | ||
| 448 | case OID_GEN_MULTICAST_BYTES_XMIT: | 448 | case OID_GEN_MULTICAST_BYTES_XMIT: |
| 449 | DBG("%s: OID_GEN_MULTICAST_BYTES_XMIT\n", __FUNCTION__); | 449 | DBG("%s: OID_GEN_MULTICAST_BYTES_XMIT\n", __func__); |
| 450 | if (rndis_per_dev_params [configNr].stats) { | 450 | if (rndis_per_dev_params [configNr].stats) { |
| 451 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 451 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 452 | .stats->multicast*1234); | 452 | .stats->multicast*1234); |
| @@ -455,7 +455,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 455 | break; | 455 | break; |
| 456 | 456 | ||
| 457 | case OID_GEN_MULTICAST_FRAMES_XMIT: | 457 | case OID_GEN_MULTICAST_FRAMES_XMIT: |
| 458 | DBG("%s: OID_GEN_MULTICAST_FRAMES_XMIT\n", __FUNCTION__); | 458 | DBG("%s: OID_GEN_MULTICAST_FRAMES_XMIT\n", __func__); |
| 459 | if (rndis_per_dev_params [configNr].stats) { | 459 | if (rndis_per_dev_params [configNr].stats) { |
| 460 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 460 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 461 | .stats->multicast); | 461 | .stats->multicast); |
| @@ -464,7 +464,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 464 | break; | 464 | break; |
| 465 | 465 | ||
| 466 | case OID_GEN_BROADCAST_BYTES_XMIT: | 466 | case OID_GEN_BROADCAST_BYTES_XMIT: |
| 467 | DBG("%s: OID_GEN_BROADCAST_BYTES_XMIT\n", __FUNCTION__); | 467 | DBG("%s: OID_GEN_BROADCAST_BYTES_XMIT\n", __func__); |
| 468 | if (rndis_per_dev_params [configNr].stats) { | 468 | if (rndis_per_dev_params [configNr].stats) { |
| 469 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 469 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 470 | .stats->tx_packets/42*255); | 470 | .stats->tx_packets/42*255); |
| @@ -473,7 +473,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 473 | break; | 473 | break; |
| 474 | 474 | ||
| 475 | case OID_GEN_BROADCAST_FRAMES_XMIT: | 475 | case OID_GEN_BROADCAST_FRAMES_XMIT: |
| 476 | DBG("%s: OID_GEN_BROADCAST_FRAMES_XMIT\n", __FUNCTION__); | 476 | DBG("%s: OID_GEN_BROADCAST_FRAMES_XMIT\n", __func__); |
| 477 | if (rndis_per_dev_params [configNr].stats) { | 477 | if (rndis_per_dev_params [configNr].stats) { |
| 478 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 478 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 479 | .stats->tx_packets/42); | 479 | .stats->tx_packets/42); |
| @@ -482,19 +482,19 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 482 | break; | 482 | break; |
| 483 | 483 | ||
| 484 | case OID_GEN_DIRECTED_BYTES_RCV: | 484 | case OID_GEN_DIRECTED_BYTES_RCV: |
| 485 | DBG("%s: OID_GEN_DIRECTED_BYTES_RCV\n", __FUNCTION__); | 485 | DBG("%s: OID_GEN_DIRECTED_BYTES_RCV\n", __func__); |
| 486 | *outbuf = __constant_cpu_to_le32 (0); | 486 | *outbuf = __constant_cpu_to_le32 (0); |
| 487 | retval = 0; | 487 | retval = 0; |
| 488 | break; | 488 | break; |
| 489 | 489 | ||
| 490 | case OID_GEN_DIRECTED_FRAMES_RCV: | 490 | case OID_GEN_DIRECTED_FRAMES_RCV: |
| 491 | DBG("%s: OID_GEN_DIRECTED_FRAMES_RCV\n", __FUNCTION__); | 491 | DBG("%s: OID_GEN_DIRECTED_FRAMES_RCV\n", __func__); |
| 492 | *outbuf = __constant_cpu_to_le32 (0); | 492 | *outbuf = __constant_cpu_to_le32 (0); |
| 493 | retval = 0; | 493 | retval = 0; |
| 494 | break; | 494 | break; |
| 495 | 495 | ||
| 496 | case OID_GEN_MULTICAST_BYTES_RCV: | 496 | case OID_GEN_MULTICAST_BYTES_RCV: |
| 497 | DBG("%s: OID_GEN_MULTICAST_BYTES_RCV\n", __FUNCTION__); | 497 | DBG("%s: OID_GEN_MULTICAST_BYTES_RCV\n", __func__); |
| 498 | if (rndis_per_dev_params [configNr].stats) { | 498 | if (rndis_per_dev_params [configNr].stats) { |
| 499 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 499 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 500 | .stats->multicast * 1111); | 500 | .stats->multicast * 1111); |
| @@ -503,7 +503,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 503 | break; | 503 | break; |
| 504 | 504 | ||
| 505 | case OID_GEN_MULTICAST_FRAMES_RCV: | 505 | case OID_GEN_MULTICAST_FRAMES_RCV: |
| 506 | DBG("%s: OID_GEN_MULTICAST_FRAMES_RCV\n", __FUNCTION__); | 506 | DBG("%s: OID_GEN_MULTICAST_FRAMES_RCV\n", __func__); |
| 507 | if (rndis_per_dev_params [configNr].stats) { | 507 | if (rndis_per_dev_params [configNr].stats) { |
| 508 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 508 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 509 | .stats->multicast); | 509 | .stats->multicast); |
| @@ -512,7 +512,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 512 | break; | 512 | break; |
| 513 | 513 | ||
| 514 | case OID_GEN_BROADCAST_BYTES_RCV: | 514 | case OID_GEN_BROADCAST_BYTES_RCV: |
| 515 | DBG("%s: OID_GEN_BROADCAST_BYTES_RCV\n", __FUNCTION__); | 515 | DBG("%s: OID_GEN_BROADCAST_BYTES_RCV\n", __func__); |
| 516 | if (rndis_per_dev_params [configNr].stats) { | 516 | if (rndis_per_dev_params [configNr].stats) { |
| 517 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 517 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 518 | .stats->rx_packets/42*255); | 518 | .stats->rx_packets/42*255); |
| @@ -521,7 +521,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 521 | break; | 521 | break; |
| 522 | 522 | ||
| 523 | case OID_GEN_BROADCAST_FRAMES_RCV: | 523 | case OID_GEN_BROADCAST_FRAMES_RCV: |
| 524 | DBG("%s: OID_GEN_BROADCAST_FRAMES_RCV\n", __FUNCTION__); | 524 | DBG("%s: OID_GEN_BROADCAST_FRAMES_RCV\n", __func__); |
| 525 | if (rndis_per_dev_params [configNr].stats) { | 525 | if (rndis_per_dev_params [configNr].stats) { |
| 526 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 526 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 527 | .stats->rx_packets/42); | 527 | .stats->rx_packets/42); |
| @@ -530,7 +530,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 530 | break; | 530 | break; |
| 531 | 531 | ||
| 532 | case OID_GEN_RCV_CRC_ERROR: | 532 | case OID_GEN_RCV_CRC_ERROR: |
| 533 | DBG("%s: OID_GEN_RCV_CRC_ERROR\n", __FUNCTION__); | 533 | DBG("%s: OID_GEN_RCV_CRC_ERROR\n", __func__); |
| 534 | if (rndis_per_dev_params [configNr].stats) { | 534 | if (rndis_per_dev_params [configNr].stats) { |
| 535 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 535 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 536 | .stats->rx_crc_errors); | 536 | .stats->rx_crc_errors); |
| @@ -539,7 +539,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 539 | break; | 539 | break; |
| 540 | 540 | ||
| 541 | case OID_GEN_TRANSMIT_QUEUE_LENGTH: | 541 | case OID_GEN_TRANSMIT_QUEUE_LENGTH: |
| 542 | DBG("%s: OID_GEN_TRANSMIT_QUEUE_LENGTH\n", __FUNCTION__); | 542 | DBG("%s: OID_GEN_TRANSMIT_QUEUE_LENGTH\n", __func__); |
| 543 | *outbuf = __constant_cpu_to_le32 (0); | 543 | *outbuf = __constant_cpu_to_le32 (0); |
| 544 | retval = 0; | 544 | retval = 0; |
| 545 | break; | 545 | break; |
| @@ -549,7 +549,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 549 | 549 | ||
| 550 | /* mandatory */ | 550 | /* mandatory */ |
| 551 | case OID_802_3_PERMANENT_ADDRESS: | 551 | case OID_802_3_PERMANENT_ADDRESS: |
| 552 | DBG("%s: OID_802_3_PERMANENT_ADDRESS\n", __FUNCTION__); | 552 | DBG("%s: OID_802_3_PERMANENT_ADDRESS\n", __func__); |
| 553 | if (rndis_per_dev_params [configNr].dev) { | 553 | if (rndis_per_dev_params [configNr].dev) { |
| 554 | length = ETH_ALEN; | 554 | length = ETH_ALEN; |
| 555 | memcpy (outbuf, | 555 | memcpy (outbuf, |
| @@ -561,7 +561,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 561 | 561 | ||
| 562 | /* mandatory */ | 562 | /* mandatory */ |
| 563 | case OID_802_3_CURRENT_ADDRESS: | 563 | case OID_802_3_CURRENT_ADDRESS: |
| 564 | DBG("%s: OID_802_3_CURRENT_ADDRESS\n", __FUNCTION__); | 564 | DBG("%s: OID_802_3_CURRENT_ADDRESS\n", __func__); |
| 565 | if (rndis_per_dev_params [configNr].dev) { | 565 | if (rndis_per_dev_params [configNr].dev) { |
| 566 | length = ETH_ALEN; | 566 | length = ETH_ALEN; |
| 567 | memcpy (outbuf, | 567 | memcpy (outbuf, |
| @@ -573,7 +573,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 573 | 573 | ||
| 574 | /* mandatory */ | 574 | /* mandatory */ |
| 575 | case OID_802_3_MULTICAST_LIST: | 575 | case OID_802_3_MULTICAST_LIST: |
| 576 | DBG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__); | 576 | DBG("%s: OID_802_3_MULTICAST_LIST\n", __func__); |
| 577 | /* Multicast base address only */ | 577 | /* Multicast base address only */ |
| 578 | *outbuf = __constant_cpu_to_le32 (0xE0000000); | 578 | *outbuf = __constant_cpu_to_le32 (0xE0000000); |
| 579 | retval = 0; | 579 | retval = 0; |
| @@ -581,21 +581,21 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 581 | 581 | ||
| 582 | /* mandatory */ | 582 | /* mandatory */ |
| 583 | case OID_802_3_MAXIMUM_LIST_SIZE: | 583 | case OID_802_3_MAXIMUM_LIST_SIZE: |
| 584 | DBG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __FUNCTION__); | 584 | DBG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __func__); |
| 585 | /* Multicast base address only */ | 585 | /* Multicast base address only */ |
| 586 | *outbuf = __constant_cpu_to_le32 (1); | 586 | *outbuf = __constant_cpu_to_le32 (1); |
| 587 | retval = 0; | 587 | retval = 0; |
| 588 | break; | 588 | break; |
| 589 | 589 | ||
| 590 | case OID_802_3_MAC_OPTIONS: | 590 | case OID_802_3_MAC_OPTIONS: |
| 591 | DBG("%s: OID_802_3_MAC_OPTIONS\n", __FUNCTION__); | 591 | DBG("%s: OID_802_3_MAC_OPTIONS\n", __func__); |
| 592 | break; | 592 | break; |
| 593 | 593 | ||
| 594 | /* ieee802.3 statistics OIDs (table 4-4) */ | 594 | /* ieee802.3 statistics OIDs (table 4-4) */ |
| 595 | 595 | ||
| 596 | /* mandatory */ | 596 | /* mandatory */ |
| 597 | case OID_802_3_RCV_ERROR_ALIGNMENT: | 597 | case OID_802_3_RCV_ERROR_ALIGNMENT: |
| 598 | DBG("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __FUNCTION__); | 598 | DBG("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __func__); |
| 599 | if (rndis_per_dev_params [configNr].stats) { | 599 | if (rndis_per_dev_params [configNr].stats) { |
| 600 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] | 600 | *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] |
| 601 | .stats->rx_frame_errors); | 601 | .stats->rx_frame_errors); |
| @@ -605,51 +605,51 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 605 | 605 | ||
| 606 | /* mandatory */ | 606 | /* mandatory */ |
| 607 | case OID_802_3_XMIT_ONE_COLLISION: | 607 | case OID_802_3_XMIT_ONE_COLLISION: |
| 608 | DBG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __FUNCTION__); | 608 | DBG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __func__); |
| 609 | *outbuf = __constant_cpu_to_le32 (0); | 609 | *outbuf = __constant_cpu_to_le32 (0); |
| 610 | retval = 0; | 610 | retval = 0; |
| 611 | break; | 611 | break; |
| 612 | 612 | ||
| 613 | /* mandatory */ | 613 | /* mandatory */ |
| 614 | case OID_802_3_XMIT_MORE_COLLISIONS: | 614 | case OID_802_3_XMIT_MORE_COLLISIONS: |
| 615 | DBG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __FUNCTION__); | 615 | DBG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __func__); |
| 616 | *outbuf = __constant_cpu_to_le32 (0); | 616 | *outbuf = __constant_cpu_to_le32 (0); |
| 617 | retval = 0; | 617 | retval = 0; |
| 618 | break; | 618 | break; |
| 619 | 619 | ||
| 620 | #ifdef RNDIS_OPTIONAL_STATS | 620 | #ifdef RNDIS_OPTIONAL_STATS |
| 621 | case OID_802_3_XMIT_DEFERRED: | 621 | case OID_802_3_XMIT_DEFERRED: |
| 622 | DBG("%s: OID_802_3_XMIT_DEFERRED\n", __FUNCTION__); | 622 | DBG("%s: OID_802_3_XMIT_DEFERRED\n", __func__); |
| 623 | /* TODO */ | 623 | /* TODO */ |
| 624 | break; | 624 | break; |
| 625 | 625 | ||
| 626 | case OID_802_3_XMIT_MAX_COLLISIONS: | 626 | case OID_802_3_XMIT_MAX_COLLISIONS: |
| 627 | DBG("%s: OID_802_3_XMIT_MAX_COLLISIONS\n", __FUNCTION__); | 627 | DBG("%s: OID_802_3_XMIT_MAX_COLLISIONS\n", __func__); |
| 628 | /* TODO */ | 628 | /* TODO */ |
| 629 | break; | 629 | break; |
| 630 | 630 | ||
| 631 | case OID_802_3_RCV_OVERRUN: | 631 | case OID_802_3_RCV_OVERRUN: |
| 632 | DBG("%s: OID_802_3_RCV_OVERRUN\n", __FUNCTION__); | 632 | DBG("%s: OID_802_3_RCV_OVERRUN\n", __func__); |
| 633 | /* TODO */ | 633 | /* TODO */ |
| 634 | break; | 634 | break; |
| 635 | 635 | ||
| 636 | case OID_802_3_XMIT_UNDERRUN: | 636 | case OID_802_3_XMIT_UNDERRUN: |
| 637 | DBG("%s: OID_802_3_XMIT_UNDERRUN\n", __FUNCTION__); | 637 | DBG("%s: OID_802_3_XMIT_UNDERRUN\n", __func__); |
| 638 | /* TODO */ | 638 | /* TODO */ |
| 639 | break; | 639 | break; |
| 640 | 640 | ||
| 641 | case OID_802_3_XMIT_HEARTBEAT_FAILURE: | 641 | case OID_802_3_XMIT_HEARTBEAT_FAILURE: |
| 642 | DBG("%s: OID_802_3_XMIT_HEARTBEAT_FAILURE\n", __FUNCTION__); | 642 | DBG("%s: OID_802_3_XMIT_HEARTBEAT_FAILURE\n", __func__); |
| 643 | /* TODO */ | 643 | /* TODO */ |
| 644 | break; | 644 | break; |
| 645 | 645 | ||
| 646 | case OID_802_3_XMIT_TIMES_CRS_LOST: | 646 | case OID_802_3_XMIT_TIMES_CRS_LOST: |
| 647 | DBG("%s: OID_802_3_XMIT_TIMES_CRS_LOST\n", __FUNCTION__); | 647 | DBG("%s: OID_802_3_XMIT_TIMES_CRS_LOST\n", __func__); |
| 648 | /* TODO */ | 648 | /* TODO */ |
| 649 | break; | 649 | break; |
| 650 | 650 | ||
| 651 | case OID_802_3_XMIT_LATE_COLLISIONS: | 651 | case OID_802_3_XMIT_LATE_COLLISIONS: |
| 652 | DBG("%s: OID_802_3_XMIT_LATE_COLLISIONS\n", __FUNCTION__); | 652 | DBG("%s: OID_802_3_XMIT_LATE_COLLISIONS\n", __func__); |
| 653 | /* TODO */ | 653 | /* TODO */ |
| 654 | break; | 654 | break; |
| 655 | #endif /* RNDIS_OPTIONAL_STATS */ | 655 | #endif /* RNDIS_OPTIONAL_STATS */ |
| @@ -657,7 +657,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 657 | #ifdef RNDIS_PM | 657 | #ifdef RNDIS_PM |
| 658 | /* power management OIDs (table 4-5) */ | 658 | /* power management OIDs (table 4-5) */ |
| 659 | case OID_PNP_CAPABILITIES: | 659 | case OID_PNP_CAPABILITIES: |
| 660 | DBG("%s: OID_PNP_CAPABILITIES\n", __FUNCTION__); | 660 | DBG("%s: OID_PNP_CAPABILITIES\n", __func__); |
| 661 | 661 | ||
| 662 | /* for now, no wakeup capabilities */ | 662 | /* for now, no wakeup capabilities */ |
| 663 | length = sizeof (struct NDIS_PNP_CAPABILITIES); | 663 | length = sizeof (struct NDIS_PNP_CAPABILITIES); |
| @@ -665,7 +665,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 665 | retval = 0; | 665 | retval = 0; |
| 666 | break; | 666 | break; |
| 667 | case OID_PNP_QUERY_POWER: | 667 | case OID_PNP_QUERY_POWER: |
| 668 | DBG("%s: OID_PNP_QUERY_POWER D%d\n", __FUNCTION__, | 668 | DBG("%s: OID_PNP_QUERY_POWER D%d\n", __func__, |
| 669 | le32_to_cpu(get_unaligned((__le32 *)buf)) - 1); | 669 | le32_to_cpu(get_unaligned((__le32 *)buf)) - 1); |
| 670 | /* only suspend is a real power state, and | 670 | /* only suspend is a real power state, and |
| 671 | * it can't be entered by OID_PNP_SET_POWER... | 671 | * it can't be entered by OID_PNP_SET_POWER... |
| @@ -677,7 +677,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
| 677 | 677 | ||
| 678 | default: | 678 | default: |
| 679 | pr_warning("%s: query unknown OID 0x%08X\n", | 679 | pr_warning("%s: query unknown OID 0x%08X\n", |
| 680 | __FUNCTION__, OID); | 680 | __func__, OID); |
| 681 | } | 681 | } |
| 682 | if (retval < 0) | 682 | if (retval < 0) |
| 683 | length = 0; | 683 | length = 0; |
| @@ -729,7 +729,7 @@ static int gen_ndis_set_resp (u8 configNr, u32 OID, u8 *buf, u32 buf_len, | |||
| 729 | *params->filter = (u16) le32_to_cpu(get_unaligned( | 729 | *params->filter = (u16) le32_to_cpu(get_unaligned( |
| 730 | (__le32 *)buf)); | 730 | (__le32 *)buf)); |
| 731 | DBG("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n", | 731 | DBG("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n", |
| 732 | __FUNCTION__, *params->filter); | 732 | __func__, *params->filter); |
| 733 | 733 | ||
| 734 | /* this call has a significant side effect: it's | 734 | /* this call has a significant side effect: it's |
| 735 | * what makes the packet flow start and stop, like | 735 | * what makes the packet flow start and stop, like |
| @@ -753,7 +753,7 @@ update_linkstate: | |||
| 753 | 753 | ||
| 754 | case OID_802_3_MULTICAST_LIST: | 754 | case OID_802_3_MULTICAST_LIST: |
| 755 | /* I think we can ignore this */ | 755 | /* I think we can ignore this */ |
| 756 | DBG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__); | 756 | DBG("%s: OID_802_3_MULTICAST_LIST\n", __func__); |
| 757 | retval = 0; | 757 | retval = 0; |
| 758 | break; | 758 | break; |
| 759 | #if 0 | 759 | #if 0 |
| @@ -762,7 +762,7 @@ update_linkstate: | |||
| 762 | struct rndis_config_parameter *param; | 762 | struct rndis_config_parameter *param; |
| 763 | param = (struct rndis_config_parameter *) buf; | 763 | param = (struct rndis_config_parameter *) buf; |
| 764 | DBG("%s: OID_GEN_RNDIS_CONFIG_PARAMETER '%*s'\n", | 764 | DBG("%s: OID_GEN_RNDIS_CONFIG_PARAMETER '%*s'\n", |
| 765 | __FUNCTION__, | 765 | __func__, |
| 766 | min(cpu_to_le32(param->ParameterNameLength),80), | 766 | min(cpu_to_le32(param->ParameterNameLength),80), |
| 767 | buf + param->ParameterNameOffset); | 767 | buf + param->ParameterNameOffset); |
| 768 | retval = 0; | 768 | retval = 0; |
| @@ -778,7 +778,7 @@ update_linkstate: | |||
| 778 | * FIXME ... then things go batty; Windows wedges itself. | 778 | * FIXME ... then things go batty; Windows wedges itself. |
| 779 | */ | 779 | */ |
| 780 | i = le32_to_cpu(get_unaligned((__le32 *)buf)); | 780 | i = le32_to_cpu(get_unaligned((__le32 *)buf)); |
| 781 | DBG("%s: OID_PNP_SET_POWER D%d\n", __FUNCTION__, i - 1); | 781 | DBG("%s: OID_PNP_SET_POWER D%d\n", __func__, i - 1); |
| 782 | switch (i) { | 782 | switch (i) { |
| 783 | case NdisDeviceStateD0: | 783 | case NdisDeviceStateD0: |
| 784 | *params->filter = params->saved_filter; | 784 | *params->filter = params->saved_filter; |
| @@ -802,7 +802,7 @@ update_linkstate: | |||
| 802 | 802 | ||
| 803 | default: | 803 | default: |
| 804 | pr_warning("%s: set unknown OID 0x%08X, size %d\n", | 804 | pr_warning("%s: set unknown OID 0x%08X, size %d\n", |
| 805 | __FUNCTION__, OID, buf_len); | 805 | __func__, OID, buf_len); |
| 806 | } | 806 | } |
| 807 | 807 | ||
| 808 | return retval; | 808 | return retval; |
| @@ -855,7 +855,7 @@ static int rndis_query_response (int configNr, rndis_query_msg_type *buf) | |||
| 855 | rndis_query_cmplt_type *resp; | 855 | rndis_query_cmplt_type *resp; |
| 856 | rndis_resp_t *r; | 856 | rndis_resp_t *r; |
| 857 | 857 | ||
| 858 | // DBG("%s: OID = %08X\n", __FUNCTION__, cpu_to_le32(buf->OID)); | 858 | // DBG("%s: OID = %08X\n", __func__, cpu_to_le32(buf->OID)); |
| 859 | if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP; | 859 | if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP; |
| 860 | 860 | ||
| 861 | /* | 861 | /* |
| @@ -908,9 +908,9 @@ static int rndis_set_response (int configNr, rndis_set_msg_type *buf) | |||
| 908 | BufOffset = le32_to_cpu (buf->InformationBufferOffset); | 908 | BufOffset = le32_to_cpu (buf->InformationBufferOffset); |
| 909 | 909 | ||
| 910 | #ifdef VERBOSE | 910 | #ifdef VERBOSE |
| 911 | DBG("%s: Length: %d\n", __FUNCTION__, BufLength); | 911 | DBG("%s: Length: %d\n", __func__, BufLength); |
| 912 | DBG("%s: Offset: %d\n", __FUNCTION__, BufOffset); | 912 | DBG("%s: Offset: %d\n", __func__, BufOffset); |
| 913 | DBG("%s: InfoBuffer: ", __FUNCTION__); | 913 | DBG("%s: InfoBuffer: ", __func__); |
| 914 | 914 | ||
| 915 | for (i = 0; i < BufLength; i++) { | 915 | for (i = 0; i < BufLength; i++) { |
| 916 | DBG("%02x ", *(((u8 *) buf) + i + 8 + BufOffset)); | 916 | DBG("%02x ", *(((u8 *) buf) + i + 8 + BufOffset)); |
| @@ -1080,14 +1080,14 @@ int rndis_msg_parser (u8 configNr, u8 *buf) | |||
| 1080 | switch (MsgType) { | 1080 | switch (MsgType) { |
| 1081 | case REMOTE_NDIS_INITIALIZE_MSG: | 1081 | case REMOTE_NDIS_INITIALIZE_MSG: |
| 1082 | DBG("%s: REMOTE_NDIS_INITIALIZE_MSG\n", | 1082 | DBG("%s: REMOTE_NDIS_INITIALIZE_MSG\n", |
| 1083 | __FUNCTION__ ); | 1083 | __func__ ); |
| 1084 | params->state = RNDIS_INITIALIZED; | 1084 | params->state = RNDIS_INITIALIZED; |
| 1085 | return rndis_init_response (configNr, | 1085 | return rndis_init_response (configNr, |
| 1086 | (rndis_init_msg_type *) buf); | 1086 | (rndis_init_msg_type *) buf); |
| 1087 | 1087 | ||
| 1088 | case REMOTE_NDIS_HALT_MSG: | 1088 | case REMOTE_NDIS_HALT_MSG: |
| 1089 | DBG("%s: REMOTE_NDIS_HALT_MSG\n", | 1089 | DBG("%s: REMOTE_NDIS_HALT_MSG\n", |
| 1090 | __FUNCTION__ ); | 1090 | __func__ ); |
| 1091 | params->state = RNDIS_UNINITIALIZED; | 1091 | params->state = RNDIS_UNINITIALIZED; |
| 1092 | if (params->dev) { | 1092 | if (params->dev) { |
| 1093 | netif_carrier_off (params->dev); | 1093 | netif_carrier_off (params->dev); |
| @@ -1105,7 +1105,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf) | |||
| 1105 | 1105 | ||
| 1106 | case REMOTE_NDIS_RESET_MSG: | 1106 | case REMOTE_NDIS_RESET_MSG: |
| 1107 | DBG("%s: REMOTE_NDIS_RESET_MSG\n", | 1107 | DBG("%s: REMOTE_NDIS_RESET_MSG\n", |
| 1108 | __FUNCTION__ ); | 1108 | __func__ ); |
| 1109 | return rndis_reset_response (configNr, | 1109 | return rndis_reset_response (configNr, |
| 1110 | (rndis_reset_msg_type *) buf); | 1110 | (rndis_reset_msg_type *) buf); |
| 1111 | 1111 | ||
| @@ -1113,7 +1113,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf) | |||
| 1113 | /* For USB: host does this every 5 seconds */ | 1113 | /* For USB: host does this every 5 seconds */ |
| 1114 | if (rndis_debug > 1) | 1114 | if (rndis_debug > 1) |
| 1115 | DBG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n", | 1115 | DBG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n", |
| 1116 | __FUNCTION__ ); | 1116 | __func__ ); |
| 1117 | return rndis_keepalive_response (configNr, | 1117 | return rndis_keepalive_response (configNr, |
| 1118 | (rndis_keepalive_msg_type *) | 1118 | (rndis_keepalive_msg_type *) |
| 1119 | buf); | 1119 | buf); |
| @@ -1124,7 +1124,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf) | |||
| 1124 | * suspending itself. | 1124 | * suspending itself. |
| 1125 | */ | 1125 | */ |
| 1126 | pr_warning("%s: unknown RNDIS message 0x%08X len %d\n", | 1126 | pr_warning("%s: unknown RNDIS message 0x%08X len %d\n", |
| 1127 | __FUNCTION__ , MsgType, MsgLength); | 1127 | __func__ , MsgType, MsgLength); |
| 1128 | { | 1128 | { |
| 1129 | unsigned i; | 1129 | unsigned i; |
| 1130 | for (i = 0; i < MsgLength; i += 16) { | 1130 | for (i = 0; i < MsgLength; i += 16) { |
| @@ -1159,7 +1159,7 @@ int rndis_register (int (* rndis_control_ack) (struct net_device *)) | |||
| 1159 | if (!rndis_per_dev_params [i].used) { | 1159 | if (!rndis_per_dev_params [i].used) { |
| 1160 | rndis_per_dev_params [i].used = 1; | 1160 | rndis_per_dev_params [i].used = 1; |
| 1161 | rndis_per_dev_params [i].ack = rndis_control_ack; | 1161 | rndis_per_dev_params [i].ack = rndis_control_ack; |
| 1162 | DBG("%s: configNr = %d\n", __FUNCTION__, i); | 1162 | DBG("%s: configNr = %d\n", __func__, i); |
| 1163 | return i; | 1163 | return i; |
| 1164 | } | 1164 | } |
| 1165 | } | 1165 | } |
| @@ -1170,7 +1170,7 @@ int rndis_register (int (* rndis_control_ack) (struct net_device *)) | |||
| 1170 | 1170 | ||
| 1171 | void rndis_deregister (int configNr) | 1171 | void rndis_deregister (int configNr) |
| 1172 | { | 1172 | { |
| 1173 | DBG("%s: \n", __FUNCTION__ ); | 1173 | DBG("%s: \n", __func__ ); |
| 1174 | 1174 | ||
| 1175 | if (configNr >= RNDIS_MAX_CONFIGS) return; | 1175 | if (configNr >= RNDIS_MAX_CONFIGS) return; |
| 1176 | rndis_per_dev_params [configNr].used = 0; | 1176 | rndis_per_dev_params [configNr].used = 0; |
| @@ -1182,7 +1182,7 @@ int rndis_set_param_dev (u8 configNr, struct net_device *dev, | |||
| 1182 | struct net_device_stats *stats, | 1182 | struct net_device_stats *stats, |
| 1183 | u16 *cdc_filter) | 1183 | u16 *cdc_filter) |
| 1184 | { | 1184 | { |
| 1185 | DBG("%s:\n", __FUNCTION__ ); | 1185 | DBG("%s:\n", __func__ ); |
| 1186 | if (!dev || !stats) return -1; | 1186 | if (!dev || !stats) return -1; |
| 1187 | if (configNr >= RNDIS_MAX_CONFIGS) return -1; | 1187 | if (configNr >= RNDIS_MAX_CONFIGS) return -1; |
| 1188 | 1188 | ||
| @@ -1195,7 +1195,7 @@ int rndis_set_param_dev (u8 configNr, struct net_device *dev, | |||
| 1195 | 1195 | ||
| 1196 | int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr) | 1196 | int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr) |
| 1197 | { | 1197 | { |
| 1198 | DBG("%s:\n", __FUNCTION__ ); | 1198 | DBG("%s:\n", __func__ ); |
| 1199 | if (!vendorDescr) return -1; | 1199 | if (!vendorDescr) return -1; |
| 1200 | if (configNr >= RNDIS_MAX_CONFIGS) return -1; | 1200 | if (configNr >= RNDIS_MAX_CONFIGS) return -1; |
| 1201 | 1201 | ||
| @@ -1207,7 +1207,7 @@ int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr) | |||
| 1207 | 1207 | ||
| 1208 | int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed) | 1208 | int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed) |
| 1209 | { | 1209 | { |
| 1210 | DBG("%s: %u %u\n", __FUNCTION__, medium, speed); | 1210 | DBG("%s: %u %u\n", __func__, medium, speed); |
| 1211 | if (configNr >= RNDIS_MAX_CONFIGS) return -1; | 1211 | if (configNr >= RNDIS_MAX_CONFIGS) return -1; |
| 1212 | 1212 | ||
| 1213 | rndis_per_dev_params [configNr].medium = medium; | 1213 | rndis_per_dev_params [configNr].medium = medium; |
| @@ -1403,7 +1403,7 @@ static struct proc_dir_entry *rndis_connect_state [RNDIS_MAX_CONFIGS]; | |||
| 1403 | #endif /* CONFIG_USB_GADGET_DEBUG_FILES */ | 1403 | #endif /* CONFIG_USB_GADGET_DEBUG_FILES */ |
| 1404 | 1404 | ||
| 1405 | 1405 | ||
| 1406 | int __devinit rndis_init (void) | 1406 | int __init rndis_init (void) |
| 1407 | { | 1407 | { |
| 1408 | u8 i; | 1408 | u8 i; |
| 1409 | 1409 | ||
| @@ -1415,7 +1415,7 @@ int __devinit rndis_init (void) | |||
| 1415 | if (!(rndis_connect_state [i] | 1415 | if (!(rndis_connect_state [i] |
| 1416 | = create_proc_entry (name, 0660, NULL))) | 1416 | = create_proc_entry (name, 0660, NULL))) |
| 1417 | { | 1417 | { |
| 1418 | DBG("%s :remove entries", __FUNCTION__); | 1418 | DBG("%s :remove entries", __func__); |
| 1419 | while (i) { | 1419 | while (i) { |
| 1420 | sprintf (name, NAME_TEMPLATE, --i); | 1420 | sprintf (name, NAME_TEMPLATE, --i); |
| 1421 | remove_proc_entry (name, NULL); | 1421 | remove_proc_entry (name, NULL); |
