|
@@ -241,8 +241,8 @@ static void _ipw_write_reg8(struct ipw_priv *priv, u32 reg, u8 value)
|
|
|
IPW_DEBUG_IO(" reg = 0x%8X : value = 0x%8X\n", reg, value);
|
|
|
_ipw_write32(priv, CX2_INDIRECT_ADDR, reg & CX2_INDIRECT_ADDR_MASK);
|
|
|
_ipw_write8(priv, CX2_INDIRECT_DATA, value);
|
|
|
- IPW_DEBUG_IO(" reg = 0x%8X : value = 0x%8X\n",
|
|
|
- (unsigned)(priv->hw_base + CX2_INDIRECT_DATA),
|
|
|
+ IPW_DEBUG_IO(" reg = 0x%8lX : value = 0x%8X\n",
|
|
|
+ (unsigned long)(priv->hw_base + CX2_INDIRECT_DATA),
|
|
|
value);
|
|
|
}
|
|
|
|
|
@@ -508,7 +508,7 @@ static int ipw_get_ordinal(struct ipw_priv *priv, u32 ord, void *val,
|
|
|
/* verify we have enough room to store the value */
|
|
|
if (*len < sizeof(u32)) {
|
|
|
IPW_DEBUG_ORD("ordinal buffer length too small, "
|
|
|
- "need %d\n", sizeof(u32));
|
|
|
+ "need %zd\n", sizeof(u32));
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
@@ -541,7 +541,7 @@ static int ipw_get_ordinal(struct ipw_priv *priv, u32 ord, void *val,
|
|
|
/* verify we have enough room to store the value */
|
|
|
if (*len < sizeof(u32)) {
|
|
|
IPW_DEBUG_ORD("ordinal buffer length too small, "
|
|
|
- "need %d\n", sizeof(u32));
|
|
|
+ "need %zd\n", sizeof(u32));
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
@@ -642,8 +642,8 @@ static ssize_t show_debug_level(struct device_driver *d, char *buf)
|
|
|
{
|
|
|
return sprintf(buf, "0x%08X\n", ipw_debug_level);
|
|
|
}
|
|
|
-static ssize_t store_debug_level(struct device_driver *d, const char *buf,
|
|
|
- size_t count)
|
|
|
+static ssize_t store_debug_level(struct device_driver *d,
|
|
|
+ const char *buf, size_t count)
|
|
|
{
|
|
|
char *p = (char *)buf;
|
|
|
u32 val;
|
|
@@ -667,23 +667,26 @@ static ssize_t store_debug_level(struct device_driver *d, const char *buf,
|
|
|
static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO,
|
|
|
show_debug_level, store_debug_level);
|
|
|
|
|
|
-static ssize_t show_status(struct device *d, char *buf)
|
|
|
+static ssize_t show_status(struct device *d,
|
|
|
+ struct device_attribute *attr, char *buf)
|
|
|
{
|
|
|
- struct ipw_priv *p = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *p = d->driver_data;
|
|
|
return sprintf(buf, "0x%08x\n", (int)p->status);
|
|
|
}
|
|
|
static DEVICE_ATTR(status, S_IRUGO, show_status, NULL);
|
|
|
|
|
|
-static ssize_t show_cfg(struct device *d, char *buf)
|
|
|
+static ssize_t show_cfg(struct device *d, struct device_attribute *attr,
|
|
|
+ char *buf)
|
|
|
{
|
|
|
- struct ipw_priv *p = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *p = d->driver_data;
|
|
|
return sprintf(buf, "0x%08x\n", (int)p->config);
|
|
|
}
|
|
|
static DEVICE_ATTR(cfg, S_IRUGO, show_cfg, NULL);
|
|
|
|
|
|
-static ssize_t show_nic_type(struct device *d, char *buf)
|
|
|
+static ssize_t show_nic_type(struct device *d,
|
|
|
+ struct device_attribute *attr, char *buf)
|
|
|
{
|
|
|
- struct ipw_priv *p = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *p = d->driver_data;
|
|
|
u8 type = p->eeprom[EEPROM_NIC_TYPE];
|
|
|
|
|
|
switch (type) {
|
|
@@ -703,8 +706,8 @@ static ssize_t show_nic_type(struct device *d, char *buf)
|
|
|
}
|
|
|
static DEVICE_ATTR(nic_type, S_IRUGO, show_nic_type, NULL);
|
|
|
|
|
|
-static ssize_t dump_error_log(struct device *d, const char *buf,
|
|
|
- size_t count)
|
|
|
+static ssize_t dump_error_log(struct device *d,
|
|
|
+ struct device_attribute *attr, const char *buf, size_t count)
|
|
|
{
|
|
|
char *p = (char *)buf;
|
|
|
|
|
@@ -715,8 +718,8 @@ static ssize_t dump_error_log(struct device *d, const char *buf,
|
|
|
}
|
|
|
static DEVICE_ATTR(dump_errors, S_IWUSR, NULL, dump_error_log);
|
|
|
|
|
|
-static ssize_t dump_event_log(struct device *d, const char *buf,
|
|
|
- size_t count)
|
|
|
+static ssize_t dump_event_log(struct device *d,
|
|
|
+ struct device_attribute *attr, const char *buf, size_t count)
|
|
|
{
|
|
|
char *p = (char *)buf;
|
|
|
|
|
@@ -727,10 +730,11 @@ static ssize_t dump_event_log(struct device *d, const char *buf,
|
|
|
}
|
|
|
static DEVICE_ATTR(dump_events, S_IWUSR, NULL, dump_event_log);
|
|
|
|
|
|
-static ssize_t show_ucode_version(struct device *d, char *buf)
|
|
|
+static ssize_t show_ucode_version(struct device *d,
|
|
|
+ struct device_attribute *attr, char *buf)
|
|
|
{
|
|
|
u32 len = sizeof(u32), tmp = 0;
|
|
|
- struct ipw_priv *p = (struct ipw_priv*)d->driver_data;
|
|
|
+ struct ipw_priv *p = d->driver_data;
|
|
|
|
|
|
if(ipw_get_ordinal(p, IPW_ORD_STAT_UCODE_VERSION, &tmp, &len))
|
|
|
return 0;
|
|
@@ -739,10 +743,11 @@ static ssize_t show_ucode_version(struct device *d, char *buf)
|
|
|
}
|
|
|
static DEVICE_ATTR(ucode_version, S_IWUSR|S_IRUGO, show_ucode_version, NULL);
|
|
|
|
|
|
-static ssize_t show_rtc(struct device *d, char *buf)
|
|
|
+static ssize_t show_rtc(struct device *d, struct device_attribute *attr,
|
|
|
+ char *buf)
|
|
|
{
|
|
|
u32 len = sizeof(u32), tmp = 0;
|
|
|
- struct ipw_priv *p = (struct ipw_priv*)d->driver_data;
|
|
|
+ struct ipw_priv *p = d->driver_data;
|
|
|
|
|
|
if(ipw_get_ordinal(p, IPW_ORD_STAT_RTC, &tmp, &len))
|
|
|
return 0;
|
|
@@ -755,35 +760,38 @@ static DEVICE_ATTR(rtc, S_IWUSR|S_IRUGO, show_rtc, NULL);
|
|
|
* Add a device attribute to view/control the delay between eeprom
|
|
|
* operations.
|
|
|
*/
|
|
|
-static ssize_t show_eeprom_delay(struct device *d, char *buf)
|
|
|
+static ssize_t show_eeprom_delay(struct device *d,
|
|
|
+ struct device_attribute *attr, char *buf)
|
|
|
{
|
|
|
int n = ((struct ipw_priv*)d->driver_data)->eeprom_delay;
|
|
|
return sprintf(buf, "%i\n", n);
|
|
|
}
|
|
|
-static ssize_t store_eeprom_delay(struct device *d, const char *buf,
|
|
|
- size_t count)
|
|
|
+static ssize_t store_eeprom_delay(struct device *d,
|
|
|
+ struct device_attribute *attr, const char *buf,
|
|
|
+ size_t count)
|
|
|
{
|
|
|
- struct ipw_priv *p = (struct ipw_priv*)d->driver_data;
|
|
|
+ struct ipw_priv *p = d->driver_data;
|
|
|
sscanf(buf, "%i", &p->eeprom_delay);
|
|
|
return strnlen(buf, count);
|
|
|
}
|
|
|
static DEVICE_ATTR(eeprom_delay, S_IWUSR|S_IRUGO,
|
|
|
show_eeprom_delay,store_eeprom_delay);
|
|
|
|
|
|
-static ssize_t show_command_event_reg(struct device *d, char *buf)
|
|
|
+static ssize_t show_command_event_reg(struct device *d,
|
|
|
+ struct device_attribute *attr, char *buf)
|
|
|
{
|
|
|
u32 reg = 0;
|
|
|
- struct ipw_priv *p = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *p = d->driver_data;
|
|
|
|
|
|
reg = ipw_read_reg32(p, CX2_INTERNAL_CMD_EVENT);
|
|
|
return sprintf(buf, "0x%08x\n", reg);
|
|
|
}
|
|
|
-static ssize_t store_command_event_reg(struct device *d,
|
|
|
- const char *buf,
|
|
|
- size_t count)
|
|
|
+static ssize_t store_command_event_reg(struct device *d,
|
|
|
+ struct device_attribute *attr, const char *buf,
|
|
|
+ size_t count)
|
|
|
{
|
|
|
u32 reg;
|
|
|
- struct ipw_priv *p = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *p = d->driver_data;
|
|
|
|
|
|
sscanf(buf, "%x", ®);
|
|
|
ipw_write_reg32(p, CX2_INTERNAL_CMD_EVENT, reg);
|
|
@@ -792,20 +800,21 @@ static ssize_t store_command_event_reg(struct device *d,
|
|
|
static DEVICE_ATTR(command_event_reg, S_IWUSR|S_IRUGO,
|
|
|
show_command_event_reg,store_command_event_reg);
|
|
|
|
|
|
-static ssize_t show_mem_gpio_reg(struct device *d, char *buf)
|
|
|
+static ssize_t show_mem_gpio_reg(struct device *d,
|
|
|
+ struct device_attribute *attr, char *buf)
|
|
|
{
|
|
|
u32 reg = 0;
|
|
|
- struct ipw_priv *p = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *p = d->driver_data;
|
|
|
|
|
|
reg = ipw_read_reg32(p, 0x301100);
|
|
|
return sprintf(buf, "0x%08x\n", reg);
|
|
|
}
|
|
|
-static ssize_t store_mem_gpio_reg(struct device *d,
|
|
|
- const char *buf,
|
|
|
- size_t count)
|
|
|
+static ssize_t store_mem_gpio_reg(struct device *d,
|
|
|
+ struct device_attribute *attr, const char *buf,
|
|
|
+ size_t count)
|
|
|
{
|
|
|
u32 reg;
|
|
|
- struct ipw_priv *p = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *p = d->driver_data;
|
|
|
|
|
|
sscanf(buf, "%x", ®);
|
|
|
ipw_write_reg32(p, 0x301100, reg);
|
|
@@ -814,10 +823,11 @@ static ssize_t store_mem_gpio_reg(struct device *d,
|
|
|
static DEVICE_ATTR(mem_gpio_reg, S_IWUSR|S_IRUGO,
|
|
|
show_mem_gpio_reg,store_mem_gpio_reg);
|
|
|
|
|
|
-static ssize_t show_indirect_dword(struct device *d, char *buf)
|
|
|
+static ssize_t show_indirect_dword(struct device *d,
|
|
|
+ struct device_attribute *attr, char *buf)
|
|
|
{
|
|
|
u32 reg = 0;
|
|
|
- struct ipw_priv *priv = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *priv = d->driver_data;
|
|
|
if (priv->status & STATUS_INDIRECT_DWORD)
|
|
|
reg = ipw_read_reg32(priv, priv->indirect_dword);
|
|
|
else
|
|
@@ -825,11 +835,11 @@ static ssize_t show_indirect_dword(struct device *d, char *buf)
|
|
|
|
|
|
return sprintf(buf, "0x%08x\n", reg);
|
|
|
}
|
|
|
-static ssize_t store_indirect_dword(struct device *d,
|
|
|
- const char *buf,
|
|
|
- size_t count)
|
|
|
+static ssize_t store_indirect_dword(struct device *d,
|
|
|
+ struct device_attribute *attr, const char *buf,
|
|
|
+ size_t count)
|
|
|
{
|
|
|
- struct ipw_priv *priv = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *priv = d->driver_data;
|
|
|
|
|
|
sscanf(buf, "%x", &priv->indirect_dword);
|
|
|
priv->status |= STATUS_INDIRECT_DWORD;
|
|
@@ -838,10 +848,11 @@ static ssize_t store_indirect_dword(struct device *d,
|
|
|
static DEVICE_ATTR(indirect_dword, S_IWUSR|S_IRUGO,
|
|
|
show_indirect_dword,store_indirect_dword);
|
|
|
|
|
|
-static ssize_t show_indirect_byte(struct device *d, char *buf)
|
|
|
+static ssize_t show_indirect_byte(struct device *d,
|
|
|
+ struct device_attribute *attr, char *buf)
|
|
|
{
|
|
|
u8 reg = 0;
|
|
|
- struct ipw_priv *priv = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *priv = d->driver_data;
|
|
|
if (priv->status & STATUS_INDIRECT_BYTE)
|
|
|
reg = ipw_read_reg8(priv, priv->indirect_byte);
|
|
|
else
|
|
@@ -849,11 +860,11 @@ static ssize_t show_indirect_byte(struct device *d, char *buf)
|
|
|
|
|
|
return sprintf(buf, "0x%02x\n", reg);
|
|
|
}
|
|
|
-static ssize_t store_indirect_byte(struct device *d,
|
|
|
- const char *buf,
|
|
|
- size_t count)
|
|
|
+static ssize_t store_indirect_byte(struct device *d,
|
|
|
+ struct device_attribute *attr, const char *buf,
|
|
|
+ size_t count)
|
|
|
{
|
|
|
- struct ipw_priv *priv = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *priv = d->driver_data;
|
|
|
|
|
|
sscanf(buf, "%x", &priv->indirect_byte);
|
|
|
priv->status |= STATUS_INDIRECT_BYTE;
|
|
@@ -862,10 +873,11 @@ static ssize_t store_indirect_byte(struct device *d,
|
|
|
static DEVICE_ATTR(indirect_byte, S_IWUSR|S_IRUGO,
|
|
|
show_indirect_byte, store_indirect_byte);
|
|
|
|
|
|
-static ssize_t show_direct_dword(struct device *d, char *buf)
|
|
|
+static ssize_t show_direct_dword(struct device *d,
|
|
|
+ struct device_attribute *attr, char *buf)
|
|
|
{
|
|
|
u32 reg = 0;
|
|
|
- struct ipw_priv *priv = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *priv = d->driver_data;
|
|
|
|
|
|
if (priv->status & STATUS_DIRECT_DWORD)
|
|
|
reg = ipw_read32(priv, priv->direct_dword);
|
|
@@ -874,11 +886,11 @@ static ssize_t show_direct_dword(struct device *d, char *buf)
|
|
|
|
|
|
return sprintf(buf, "0x%08x\n", reg);
|
|
|
}
|
|
|
-static ssize_t store_direct_dword(struct device *d,
|
|
|
- const char *buf,
|
|
|
- size_t count)
|
|
|
+static ssize_t store_direct_dword(struct device *d,
|
|
|
+ struct device_attribute *attr, const char *buf,
|
|
|
+ size_t count)
|
|
|
{
|
|
|
- struct ipw_priv *priv = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *priv = d->driver_data;
|
|
|
|
|
|
sscanf(buf, "%x", &priv->direct_dword);
|
|
|
priv->status |= STATUS_DIRECT_DWORD;
|
|
@@ -898,13 +910,14 @@ static inline int rf_kill_active(struct ipw_priv *priv)
|
|
|
return (priv->status & STATUS_RF_KILL_HW) ? 1 : 0;
|
|
|
}
|
|
|
|
|
|
-static ssize_t show_rf_kill(struct device *d, char *buf)
|
|
|
+static ssize_t show_rf_kill(struct device *d, struct device_attribute *attr,
|
|
|
+ char *buf)
|
|
|
{
|
|
|
/* 0 - RF kill not enabled
|
|
|
1 - SW based RF kill active (sysfs)
|
|
|
2 - HW based RF kill active
|
|
|
3 - Both HW and SW baed RF kill active */
|
|
|
- struct ipw_priv *priv = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *priv = d->driver_data;
|
|
|
int val = ((priv->status & STATUS_RF_KILL_SW) ? 0x1 : 0x0) |
|
|
|
(rf_kill_active(priv) ? 0x2 : 0x0);
|
|
|
return sprintf(buf, "%i\n", val);
|
|
@@ -943,9 +956,10 @@ static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio)
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
-static ssize_t store_rf_kill(struct device *d, const char *buf, size_t count)
|
|
|
+static ssize_t store_rf_kill(struct device *d, struct device_attribute *attr,
|
|
|
+ const char *buf, size_t count)
|
|
|
{
|
|
|
- struct ipw_priv *priv = (struct ipw_priv *)d->driver_data;
|
|
|
+ struct ipw_priv *priv = d->driver_data;
|
|
|
|
|
|
ipw_radio_kill_sw(priv, buf[0] == '1');
|
|
|
|
|
@@ -1740,7 +1754,7 @@ static int ipw_fw_dma_write_command_block(struct ipw_priv *priv, int index, stru
|
|
|
u32 address = CX2_SHARED_SRAM_DMA_CONTROL + (sizeof(struct command_block) * index);
|
|
|
IPW_DEBUG_FW(">> :\n");
|
|
|
|
|
|
- ipw_write_indirect(priv, address, (u8*)cb, sizeof(struct command_block));
|
|
|
+ ipw_write_indirect(priv, address, (u8*)cb, (int)sizeof(struct command_block));
|
|
|
|
|
|
IPW_DEBUG_FW("<< :\n");
|
|
|
return 0;
|
|
@@ -2342,7 +2356,7 @@ static int ipw_get_fw(struct ipw_priv *priv,
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- IPW_DEBUG_INFO("Loading firmware '%s' file v%d.%d (%d bytes)\n",
|
|
|
+ IPW_DEBUG_INFO("Loading firmware '%s' file v%d.%d (%zd bytes)\n",
|
|
|
name,
|
|
|
IPW_FW_MAJOR(header->version),
|
|
|
IPW_FW_MINOR(header->version),
|
|
@@ -2697,7 +2711,7 @@ static int ipw_queue_tx_init(struct ipw_priv *priv,
|
|
|
|
|
|
q->bd = pci_alloc_consistent(dev,sizeof(q->bd[0])*count, &q->q.dma_addr);
|
|
|
if (!q->bd) {
|
|
|
- IPW_ERROR("pci_alloc_consistent(%d) failed\n",
|
|
|
+ IPW_ERROR("pci_alloc_consistent(%zd) failed\n",
|
|
|
sizeof(q->bd[0]) * count);
|
|
|
kfree(q->txb);
|
|
|
q->txb = NULL;
|
|
@@ -3466,8 +3480,8 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
|
|
|
x->channel_num);
|
|
|
} else {
|
|
|
IPW_DEBUG_SCAN("Scan result of wrong size %d "
|
|
|
- "(should be %d)\n",
|
|
|
- notif->size,sizeof(*x));
|
|
|
+ "(should be %zd)\n",
|
|
|
+ notif->size, sizeof(*x));
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
@@ -3482,8 +3496,8 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
|
|
|
x->status);
|
|
|
} else {
|
|
|
IPW_ERROR("Scan completed of wrong size %d "
|
|
|
- "(should be %d)\n",
|
|
|
- notif->size,sizeof(*x));
|
|
|
+ "(should be %zd)\n",
|
|
|
+ notif->size, sizeof(*x));
|
|
|
}
|
|
|
|
|
|
priv->status &= ~(STATUS_SCANNING | STATUS_SCAN_ABORTING);
|
|
@@ -3515,7 +3529,7 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
|
|
|
IPW_ERROR("Frag length: %d\n", x->frag_length);
|
|
|
} else {
|
|
|
IPW_ERROR("Frag length of wrong size %d "
|
|
|
- "(should be %d)\n",
|
|
|
+ "(should be %zd)\n",
|
|
|
notif->size, sizeof(*x));
|
|
|
}
|
|
|
break;
|
|
@@ -3532,8 +3546,8 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
|
|
|
memcpy(&priv->last_link_deterioration, x, sizeof(*x));
|
|
|
} else {
|
|
|
IPW_ERROR("Link Deterioration of wrong size %d "
|
|
|
- "(should be %d)\n",
|
|
|
- notif->size,sizeof(*x));
|
|
|
+ "(should be %zd)\n",
|
|
|
+ notif->size, sizeof(*x));
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
@@ -3552,7 +3566,7 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
|
|
|
struct notif_beacon_state *x = ¬if->u.beacon_state;
|
|
|
if (notif->size != sizeof(*x)) {
|
|
|
IPW_ERROR("Beacon state of wrong size %d (should "
|
|
|
- "be %d)\n", notif->size, sizeof(*x));
|
|
|
+ "be %zd)\n", notif->size, sizeof(*x));
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -3602,8 +3616,8 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- IPW_ERROR("TGi Tx Key of wrong size %d (should be %d)\n",
|
|
|
- notif->size,sizeof(*x));
|
|
|
+ IPW_ERROR("TGi Tx Key of wrong size %d (should be %zd)\n",
|
|
|
+ notif->size, sizeof(*x));
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -3616,8 +3630,8 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- IPW_ERROR("Calibration of wrong size %d (should be %d)\n",
|
|
|
- notif->size,sizeof(*x));
|
|
|
+ IPW_ERROR("Calibration of wrong size %d (should be %zd)\n",
|
|
|
+ notif->size, sizeof(*x));
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -3628,7 +3642,7 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- IPW_ERROR("Noise stat is wrong size %d (should be %d)\n",
|
|
|
+ IPW_ERROR("Noise stat is wrong size %d (should be %zd)\n",
|
|
|
notif->size, sizeof(u32));
|
|
|
break;
|
|
|
}
|
|
@@ -4823,7 +4837,7 @@ static inline void ipw_handle_data_packet(struct ipw_priv *priv,
|
|
|
}
|
|
|
|
|
|
/* Advance skb->data to the start of the actual payload */
|
|
|
- skb_reserve(rxb->skb, (u32)&pkt->u.frame.data[0] - (u32)pkt);
|
|
|
+ skb_reserve(rxb->skb, offsetof(struct ipw_rx_packet, u.frame.data));
|
|
|
|
|
|
/* Set the size of the skb to the size of the frame */
|
|
|
skb_put(rxb->skb, pkt->u.frame.length);
|
|
@@ -6979,10 +6993,9 @@ static int ipw_pci_probe(struct pci_dev *pdev,
|
|
|
|
|
|
pci_set_master(pdev);
|
|
|
|
|
|
-#define PCI_DMA_32BIT 0x00000000ffffffffULL
|
|
|
- err = pci_set_dma_mask(pdev, PCI_DMA_32BIT);
|
|
|
+ err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
|
|
if (!err)
|
|
|
- err = pci_set_consistent_dma_mask(pdev, PCI_DMA_32BIT);
|
|
|
+ err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
|
|
|
if (err) {
|
|
|
printk(KERN_WARNING DRV_NAME ": No suitable DMA available.\n");
|
|
|
goto out_pci_disable_device;
|