#define HCI_HEADER_SIZE 4
#define HCI_VALUE_OFFS (HCI_HEADER_SIZE)
#define HCI_MAX_PACKET 2048
-#define HCI_MAX_PARAM (HCI_MAX_PACKET-HCI_HEADER_SIZE)
+#define HCI_MAX_PARAM (HCI_MAX_PACKET - HCI_HEADER_SIZE)
#define HCI_MAX_TLV 32
/* CMD-EVT */
#define ND_NLMSG_SPACE(len) (nlmsg_total_size(len) + ND_IFINDEX_LEN)
#define ND_NLMSG_DATA(nlh) \
((void *)((char *)nlmsg_data(nlh) + ND_IFINDEX_LEN))
-#define ND_NLMSG_S_LEN(len) (len+ND_IFINDEX_LEN)
-#define ND_NLMSG_R_LEN(nlh) (nlh->nlmsg_len-ND_IFINDEX_LEN)
+#define ND_NLMSG_S_LEN(len) (len + ND_IFINDEX_LEN)
+#define ND_NLMSG_R_LEN(nlh) (nlh->nlmsg_len - ND_IFINDEX_LEN)
#define ND_NLMSG_IFIDX(nlh) nlmsg_data(nlh)
#define ND_MAX_MSG_LEN 8096
NETLINK_CB(skb).portid = 0;
NETLINK_CB(skb).dst_group = 0;
- ret = netlink_broadcast(sock, skb, 0, group+1, GFP_ATOMIC);
+ ret = netlink_broadcast(sock, skb, 0, group + 1, GFP_ATOMIC);
if (!ret)
return len;
buf[1] = (len >> 8) & 0xff;
buf[2] = (len >> 16) & 0xff;
- memcpy(buf+TYPE_A_HEADER_SIZE, firm->data + pos, len);
+ memcpy(buf + TYPE_A_HEADER_SIZE, firm->data + pos, len);
ret = sdio_memcpy_toio(func, 0, buf, len + TYPE_A_HEADER_SIZE);
if (ret < 0) {
dev_err(&func->dev,
return -ENOMEM;
}
- strcpy(buf+pad_size, type_string);
- ret = gdm_wibro_send(usbdev, buf, strlen(type_string)+pad_size);
+ strcpy(buf + pad_size, type_string);
+ ret = gdm_wibro_send(usbdev, buf, strlen(type_string) + pad_size);
if (ret < 0)
goto out;
else
len = img_len; /* the last chunk of data */
- memcpy(buf+pad_size, firm->data + pos, len);
- ret = gdm_wibro_send(usbdev, buf, len+pad_size);
+ memcpy(buf + pad_size, firm->data + pos, len);
+ ret = gdm_wibro_send(usbdev, buf, len + pad_size);
if (ret < 0)
goto out;
img_len -= DOWNLOAD_CHUCK;
pos += DOWNLOAD_CHUCK;
- ret = em_wait_ack(usbdev, ((len+pad_size) % 512 == 0));
+ ret = em_wait_ack(usbdev, ((len + pad_size) % 512 == 0));
if (ret < 0)
goto out;
}