diff options
Diffstat (limited to 'drivers/net/wireless/hermes.c')
-rw-r--r-- | drivers/net/wireless/hermes.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/drivers/net/wireless/hermes.c b/drivers/net/wireless/hermes.c index be24f01ea469..2aa2f389c0d5 100644 --- a/drivers/net/wireless/hermes.c +++ b/drivers/net/wireless/hermes.c | |||
@@ -424,43 +424,6 @@ int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, int len, | |||
424 | return err; | 424 | return err; |
425 | } | 425 | } |
426 | 426 | ||
427 | /* Write a block of data to the chip's buffer with padding if | ||
428 | * neccessary, via the BAP. Synchronization/serialization is the | ||
429 | * caller's problem. | ||
430 | * | ||
431 | * Returns: < 0 on internal failure (errno), 0 on success, > 0 on error from firmware | ||
432 | */ | ||
433 | int hermes_bap_pwrite_pad(hermes_t *hw, int bap, const void *buf, unsigned data_len, int len, | ||
434 | u16 id, u16 offset) | ||
435 | { | ||
436 | int dreg = bap ? HERMES_DATA1 : HERMES_DATA0; | ||
437 | int err = 0; | ||
438 | |||
439 | if (len < 0 || data_len > len) | ||
440 | return -EINVAL; | ||
441 | |||
442 | err = hermes_bap_seek(hw, bap, id, offset); | ||
443 | if (err) | ||
444 | goto out; | ||
445 | |||
446 | /* Transfer all the complete words of data */ | ||
447 | hermes_write_bytes(hw, dreg, buf, data_len); | ||
448 | /* If there is an odd byte left over pad and transfer it */ | ||
449 | if (data_len & 1) { | ||
450 | u8 end[2]; | ||
451 | end[1] = 0; | ||
452 | end[0] = ((unsigned char *)buf)[data_len - 1]; | ||
453 | hermes_write_bytes(hw, dreg, end, 2); | ||
454 | data_len ++; | ||
455 | } | ||
456 | /* Now send zeros for the padding */ | ||
457 | if (data_len < len) | ||
458 | hermes_clear_words(hw, dreg, (len - data_len) / 2); | ||
459 | /* Complete */ | ||
460 | out: | ||
461 | return err; | ||
462 | } | ||
463 | |||
464 | /* Read a Length-Type-Value record from the card. | 427 | /* Read a Length-Type-Value record from the card. |
465 | * | 428 | * |
466 | * If length is NULL, we ignore the length read from the card, and | 429 | * If length is NULL, we ignore the length read from the card, and |
@@ -548,7 +511,6 @@ EXPORT_SYMBOL(hermes_allocate); | |||
548 | 511 | ||
549 | EXPORT_SYMBOL(hermes_bap_pread); | 512 | EXPORT_SYMBOL(hermes_bap_pread); |
550 | EXPORT_SYMBOL(hermes_bap_pwrite); | 513 | EXPORT_SYMBOL(hermes_bap_pwrite); |
551 | EXPORT_SYMBOL(hermes_bap_pwrite_pad); | ||
552 | EXPORT_SYMBOL(hermes_read_ltv); | 514 | EXPORT_SYMBOL(hermes_read_ltv); |
553 | EXPORT_SYMBOL(hermes_write_ltv); | 515 | EXPORT_SYMBOL(hermes_write_ltv); |
554 | 516 | ||