* rsc must be 8 bytes
  * tsc must be 8 bytes or NULL
  */
-int __orinoco_hw_set_tkip_key(hermes_t *hw, int key_idx, int set_tx,
-                             u8 *key, u8 *rsc, u8 *tsc)
+int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,
+                             int set_tx, u8 *key, u8 *rsc, u8 *tsc)
 {
        struct {
                __le16 idx;
                u8 rx_mic[MIC_KEYLEN];
                u8 tsc[IW_ENCODE_SEQ_MAX_SIZE];
        } __attribute__ ((packed)) buf;
+       hermes_t *hw = &priv->hw;
        int ret;
        int err;
        int k;
 
 int __orinoco_hw_set_wap(struct orinoco_private *priv);
 int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv);
 int __orinoco_hw_setup_enc(struct orinoco_private *priv);
-int __orinoco_hw_set_tkip_key(hermes_t *hw, int key_idx, int set_tx,
-                             u8 *key, u8 *rsc, u8 *tsc);
+int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,
+                             int set_tx, u8 *key, u8 *rsc, u8 *tsc);
 int orinoco_clear_tkip_key(struct orinoco_private *priv, int key_idx);
 int __orinoco_hw_set_multicast_list(struct orinoco_private *priv,
                                    struct dev_addr_list *mc_list,
 
 
                case IW_ENCODE_ALG_TKIP:
                {
-                       hermes_t *hw = &priv->hw;
                        u8 *tkip_iv = NULL;
 
                        if (!priv->has_wpa ||
                        if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID)
                                tkip_iv = &ext->rx_seq[0];
 
-                       err = __orinoco_hw_set_tkip_key(hw, idx,
+                       err = __orinoco_hw_set_tkip_key(priv, idx,
                                 ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY,
                                 (u8 *) &priv->tkip_key[idx],
                                 tkip_iv, NULL);