]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wireless/hermes.h
[PATCH] bcm43xx: redesign locking
[linux-2.6-omap-h63xx.git] / drivers / net / wireless / hermes.h
index 34ccba2d4354f897db563bb4fb7450ce3781bfe1..8e3f0e3edb58f57e6a20aef2187c8317acb8ddc3 100644 (file)
@@ -359,8 +359,6 @@ int hermes_bap_pread(hermes_t *hw, int bap, void *buf, int len,
                       u16 id, u16 offset);
 int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, int len,
                        u16 id, u16 offset);
-int hermes_bap_pwrite_pad(hermes_t *hw, int bap, const void *buf,
-                       unsigned data_len, int len, u16 id, u16 offset);
 int hermes_read_ltv(hermes_t *hw, int bap, u16 rid, unsigned buflen,
                    u16 *length, void *buf);
 int hermes_write_ltv(hermes_t *hw, int bap, u16 rid,
@@ -408,10 +406,13 @@ static inline void hermes_read_words(struct hermes *hw, int off, void *buf, unsi
        ioread16_rep(hw->iobase + off, buf, count);
 }
 
-static inline void hermes_write_words(struct hermes *hw, int off, const void *buf, unsigned count)
+static inline void hermes_write_bytes(struct hermes *hw, int off,
+                                     const char *buf, unsigned count)
 {
        off = off << hw->reg_spacing;
-       iowrite16_rep(hw->iobase + off, buf, count);
+       iowrite16_rep(hw->iobase + off, buf, count >> 1);
+       if (unlikely(count & 1))
+               iowrite8(buf[count - 1], hw->iobase + off);
 }
 
 static inline void hermes_clear_words(struct hermes *hw, int off, unsigned count)