diff options
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r-- | drivers/staging/vt6656/baseband.h | 20 | ||||
-rw-r--r-- | drivers/staging/vt6656/card.c | 15 | ||||
-rw-r--r-- | drivers/staging/vt6656/mac.c | 2 | ||||
-rw-r--r-- | drivers/staging/vt6656/main_usb.c | 8 | ||||
-rw-r--r-- | drivers/staging/vt6656/rf.c | 10 |
5 files changed, 23 insertions, 32 deletions
diff --git a/drivers/staging/vt6656/baseband.h b/drivers/staging/vt6656/baseband.h index 7cc13874f8f1..fe1c25c64cca 100644 --- a/drivers/staging/vt6656/baseband.h +++ b/drivers/staging/vt6656/baseband.h @@ -86,15 +86,15 @@ struct vnt_phy_field { unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type, unsigned int frame_length, u16 tx_rate); -void vnt_get_phy_field(struct vnt_private *, u32 frame_length, - u16 tx_rate, u8 pkt_type, struct vnt_phy_field *); - -void vnt_set_short_slot_time(struct vnt_private *); -void vnt_set_vga_gain_offset(struct vnt_private *, u8); -void vnt_set_antenna_mode(struct vnt_private *, u8); -int vnt_vt3184_init(struct vnt_private *); -void vnt_set_deep_sleep(struct vnt_private *); -void vnt_exit_deep_sleep(struct vnt_private *); -void vnt_update_pre_ed_threshold(struct vnt_private *, int scanning); +void vnt_get_phy_field(struct vnt_private *priv, u32 frame_length, + u16 tx_rate, u8 pkt_type, struct vnt_phy_field *phy); + +void vnt_set_short_slot_time(struct vnt_private *priv); +void vnt_set_vga_gain_offset(struct vnt_private *priv, u8 data); +void vnt_set_antenna_mode(struct vnt_private *priv, u8 antenna_mode); +int vnt_vt3184_init(struct vnt_private *priv); +void vnt_set_deep_sleep(struct vnt_private *priv); +void vnt_exit_deep_sleep(struct vnt_private *priv); +void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning); #endif /* __BASEBAND_H__ */ diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 53b469c71dc2..0e5a99375099 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -501,16 +501,7 @@ u8 vnt_get_pkt_type(struct vnt_private *priv) */ u64 vnt_get_tsf_offset(u8 rx_rate, u64 tsf1, u64 tsf2) { - u64 tsf_offset = 0; - u16 rx_bcn_offset; - - rx_bcn_offset = cw_rxbcntsf_off[rx_rate % MAX_RATE]; - - tsf2 += (u64)rx_bcn_offset; - - tsf_offset = tsf1 - tsf2; - - return tsf_offset; + return tsf1 - tsf2 - (u64)cw_rxbcntsf_off[rx_rate % MAX_RATE]; } /* @@ -610,8 +601,8 @@ u64 vnt_get_next_tbtt(u64 tsf, u16 beacon_interval) beacon_int = beacon_interval * 1024; /* Next TBTT = - * ((local_current_TSF / beacon_interval) + 1) * beacon_interval - */ + * ((local_current_TSF / beacon_interval) + 1) * beacon_interval + */ if (beacon_int) { do_div(tsf, beacon_int); tsf += 1; diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c index eeed16e9124e..611da4929ddc 100644 --- a/drivers/staging/vt6656/mac.c +++ b/drivers/staging/vt6656/mac.c @@ -121,7 +121,7 @@ void vnt_mac_set_keyentry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx, u16 offset; offset = MISCFIFO_KEYETRY0; - offset += (entry_idx * MISCFIFO_KEYENTRYSIZE); + offset += entry_idx * MISCFIFO_KEYENTRYSIZE; set_key.u.write.key_ctl = cpu_to_le16(key_ctl); ether_addr_copy(set_key.u.write.addr, addr); diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 0594828bdabf..50d02d9aa535 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -85,7 +85,7 @@ MODULE_PARM_DESC(tx_buffers, "Number of receive usb tx buffers"); * Static vars definitions */ -static struct usb_device_id vt6656_table[] = { +static const struct usb_device_id vt6656_table[] = { {USB_DEVICE(VNT_USB_VENDOR_ID, VNT_USB_PRODUCT_ID)}, {} }; @@ -326,9 +326,9 @@ static int vnt_init_registers(struct vnt_private *priv) priv->current_net_addr); /* - * set BB and packet type at the same time - * set Short Slot Time, xIFS, and RSPINF - */ + * set BB and packet type at the same time + * set Short Slot Time, xIFS, and RSPINF + */ if (priv->bb_type == BB_TYPE_11A) priv->short_slot_time = true; else diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 79a3108719a6..6101a35582b6 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -730,9 +730,9 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate) return false; /* - * 0x080F1B00 for 3 wire control TxGain(D10) - * and 0x31 as TX Gain value - */ + * 0x080F1B00 for 3 wire control TxGain(D10) + * and 0x31 as TX Gain value + */ power_setting = 0x080c0b00 | (power << 12); ret &= vnt_rf_write_embedded(priv, power_setting); @@ -800,8 +800,8 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate) /* Convert rssi to dbm */ void vnt_rf_rssi_to_dbm(struct vnt_private *priv, u8 rssi, long *dbm) { - u8 idx = (((rssi & 0xc0) >> 6) & 0x03); - long b = (rssi & 0x3f); + u8 idx = ((rssi & 0xc0) >> 6) & 0x03; + long b = rssi & 0x3f; long a = 0; u8 airoharf[4] = {0, 18, 0, 40}; |