Commit 13381dcd authored by Ryder Lee's avatar Ryder Lee Committed by Felix Fietkau

mt76: fix some checkpatch warnings

This fixes the following checkpatch warnings:
CHECK: Alignment should match open parenthesis
CHECK: No space is necessary after a cast
Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 01cfc1b4
...@@ -23,7 +23,8 @@ mt76_aggr_release(struct mt76_rx_tid *tid, struct sk_buff_head *frames, int idx) ...@@ -23,7 +23,8 @@ mt76_aggr_release(struct mt76_rx_tid *tid, struct sk_buff_head *frames, int idx)
} }
static void static void
mt76_rx_aggr_release_frames(struct mt76_rx_tid *tid, struct sk_buff_head *frames, mt76_rx_aggr_release_frames(struct mt76_rx_tid *tid,
struct sk_buff_head *frames,
u16 head) u16 head)
{ {
int idx; int idx;
...@@ -63,15 +64,14 @@ mt76_rx_aggr_check_release(struct mt76_rx_tid *tid, struct sk_buff_head *frames) ...@@ -63,15 +64,14 @@ mt76_rx_aggr_check_release(struct mt76_rx_tid *tid, struct sk_buff_head *frames)
for (idx = (tid->head + 1) % tid->size; for (idx = (tid->head + 1) % tid->size;
idx != start && nframes; idx != start && nframes;
idx = (idx + 1) % tid->size) { idx = (idx + 1) % tid->size) {
skb = tid->reorder_buf[idx]; skb = tid->reorder_buf[idx];
if (!skb) if (!skb)
continue; continue;
nframes--; nframes--;
status = (struct mt76_rx_status *) skb->cb; status = (struct mt76_rx_status *)skb->cb;
if (!time_after(jiffies, status->reorder_time + if (!time_after(jiffies,
REORDER_TIMEOUT)) status->reorder_time + REORDER_TIMEOUT))
continue; continue;
mt76_rx_aggr_release_frames(tid, frames, status->seqno); mt76_rx_aggr_release_frames(tid, frames, status->seqno);
...@@ -111,8 +111,8 @@ mt76_rx_aggr_reorder_work(struct work_struct *work) ...@@ -111,8 +111,8 @@ mt76_rx_aggr_reorder_work(struct work_struct *work)
static void static void
mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames) mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames)
{ {
struct mt76_rx_status *status = (struct mt76_rx_status *) skb->cb; struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
struct ieee80211_bar *bar = (struct ieee80211_bar *) skb->data; struct ieee80211_bar *bar = (struct ieee80211_bar *)skb->data;
struct mt76_wcid *wcid = status->wcid; struct mt76_wcid *wcid = status->wcid;
struct mt76_rx_tid *tid; struct mt76_rx_tid *tid;
u16 seqno; u16 seqno;
...@@ -137,8 +137,8 @@ mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames) ...@@ -137,8 +137,8 @@ mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames)
void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames) void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames)
{ {
struct mt76_rx_status *status = (struct mt76_rx_status *) skb->cb; struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct mt76_wcid *wcid = status->wcid; struct mt76_wcid *wcid = status->wcid;
struct ieee80211_sta *sta; struct ieee80211_sta *sta;
struct mt76_rx_tid *tid; struct mt76_rx_tid *tid;
...@@ -222,7 +222,8 @@ void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames) ...@@ -222,7 +222,8 @@ void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames)
tid->nframes++; tid->nframes++;
mt76_rx_aggr_release_head(tid, frames); mt76_rx_aggr_release_head(tid, frames);
ieee80211_queue_delayed_work(tid->dev->hw, &tid->reorder_work, REORDER_TIMEOUT); ieee80211_queue_delayed_work(tid->dev->hw, &tid->reorder_work,
REORDER_TIMEOUT);
out: out:
spin_unlock_bh(&tid->lock); spin_unlock_bh(&tid->lock);
......
...@@ -493,7 +493,7 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget) ...@@ -493,7 +493,7 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
skb_reserve(skb, q->buf_offset); skb_reserve(skb, q->buf_offset);
if (q == &dev->q_rx[MT_RXQ_MCU]) { if (q == &dev->q_rx[MT_RXQ_MCU]) {
u32 *rxfce = (u32 *) skb->cb; u32 *rxfce = (u32 *)skb->cb;
*rxfce = info; *rxfce = info;
} }
......
...@@ -494,7 +494,7 @@ struct ieee80211_sta *mt76_rx_convert(struct sk_buff *skb) ...@@ -494,7 +494,7 @@ struct ieee80211_sta *mt76_rx_convert(struct sk_buff *skb)
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct mt76_rx_status mstat; struct mt76_rx_status mstat;
mstat = *((struct mt76_rx_status *) skb->cb); mstat = *((struct mt76_rx_status *)skb->cb);
memset(status, 0, sizeof(*status)); memset(status, 0, sizeof(*status));
status->flag = mstat.flag; status->flag = mstat.flag;
...@@ -509,8 +509,10 @@ struct ieee80211_sta *mt76_rx_convert(struct sk_buff *skb) ...@@ -509,8 +509,10 @@ struct ieee80211_sta *mt76_rx_convert(struct sk_buff *skb)
status->chains = mstat.chains; status->chains = mstat.chains;
BUILD_BUG_ON(sizeof(mstat) > sizeof(skb->cb)); BUILD_BUG_ON(sizeof(mstat) > sizeof(skb->cb));
BUILD_BUG_ON(sizeof(status->chain_signal) != sizeof(mstat.chain_signal)); BUILD_BUG_ON(sizeof(status->chain_signal) !=
memcpy(status->chain_signal, mstat.chain_signal, sizeof(mstat.chain_signal)); sizeof(mstat.chain_signal));
memcpy(status->chain_signal, mstat.chain_signal,
sizeof(mstat.chain_signal));
return wcid_to_sta(mstat.wcid); return wcid_to_sta(mstat.wcid);
} }
...@@ -519,7 +521,7 @@ EXPORT_SYMBOL(mt76_rx_convert); ...@@ -519,7 +521,7 @@ EXPORT_SYMBOL(mt76_rx_convert);
static int static int
mt76_check_ccmp_pn(struct sk_buff *skb) mt76_check_ccmp_pn(struct sk_buff *skb)
{ {
struct mt76_rx_status *status = (struct mt76_rx_status *) skb->cb; struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
struct mt76_wcid *wcid = status->wcid; struct mt76_wcid *wcid = status->wcid;
struct ieee80211_hdr *hdr; struct ieee80211_hdr *hdr;
int ret; int ret;
...@@ -535,7 +537,7 @@ mt76_check_ccmp_pn(struct sk_buff *skb) ...@@ -535,7 +537,7 @@ mt76_check_ccmp_pn(struct sk_buff *skb)
* Validate the first fragment both here and in mac80211 * Validate the first fragment both here and in mac80211
* All further fragments will be validated by mac80211 only. * All further fragments will be validated by mac80211 only.
*/ */
hdr = (struct ieee80211_hdr *) skb->data; hdr = (struct ieee80211_hdr *)skb->data;
if (ieee80211_is_frag(hdr) && if (ieee80211_is_frag(hdr) &&
!ieee80211_is_first_frag(hdr->frame_control)) !ieee80211_is_first_frag(hdr->frame_control))
return 0; return 0;
...@@ -558,8 +560,8 @@ mt76_check_ccmp_pn(struct sk_buff *skb) ...@@ -558,8 +560,8 @@ mt76_check_ccmp_pn(struct sk_buff *skb)
static void static void
mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb) mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb)
{ {
struct mt76_rx_status *status = (struct mt76_rx_status *) skb->cb; struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct ieee80211_sta *sta; struct ieee80211_sta *sta;
struct mt76_wcid *wcid = status->wcid; struct mt76_wcid *wcid = status->wcid;
bool ps; bool ps;
...@@ -568,13 +570,13 @@ mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb) ...@@ -568,13 +570,13 @@ mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb)
if (ieee80211_is_pspoll(hdr->frame_control) && !wcid) { if (ieee80211_is_pspoll(hdr->frame_control) && !wcid) {
sta = ieee80211_find_sta_by_ifaddr(dev->hw, hdr->addr2, NULL); sta = ieee80211_find_sta_by_ifaddr(dev->hw, hdr->addr2, NULL);
if (sta) if (sta)
wcid = status->wcid = (struct mt76_wcid *) sta->drv_priv; wcid = status->wcid = (struct mt76_wcid *)sta->drv_priv;
} }
if (!wcid || !wcid->sta) if (!wcid || !wcid->sta)
return; return;
sta = container_of((void *) wcid, struct ieee80211_sta, drv_priv); sta = container_of((void *)wcid, struct ieee80211_sta, drv_priv);
if (status->signal <= 0) if (status->signal <= 0)
ewma_signal_add(&wcid->rssi, -status->signal); ewma_signal_add(&wcid->rssi, -status->signal);
...@@ -620,7 +622,7 @@ mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb) ...@@ -620,7 +622,7 @@ mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb)
if (!sta->txq[i]) if (!sta->txq[i])
continue; continue;
mtxq = (struct mt76_txq *) sta->txq[i]->drv_priv; mtxq = (struct mt76_txq *)sta->txq[i]->drv_priv;
if (!skb_queue_empty(&mtxq->retry_q)) if (!skb_queue_empty(&mtxq->retry_q))
ieee80211_schedule_txq(dev->hw, sta->txq[i]); ieee80211_schedule_txq(dev->hw, sta->txq[i]);
} }
......
...@@ -674,7 +674,7 @@ static inline struct mt76_tx_cb *mt76_tx_skb_cb(struct sk_buff *skb) ...@@ -674,7 +674,7 @@ static inline struct mt76_tx_cb *mt76_tx_skb_cb(struct sk_buff *skb)
{ {
BUILD_BUG_ON(sizeof(struct mt76_tx_cb) > BUILD_BUG_ON(sizeof(struct mt76_tx_cb) >
sizeof(IEEE80211_SKB_CB(skb)->status.status_driver_data)); sizeof(IEEE80211_SKB_CB(skb)->status.status_driver_data));
return ((void *) IEEE80211_SKB_CB(skb)->status.status_driver_data); return ((void *)IEEE80211_SKB_CB(skb)->status.status_driver_data);
} }
static inline void mt76_insert_hdr_pad(struct sk_buff *skb) static inline void mt76_insert_hdr_pad(struct sk_buff *skb)
......
...@@ -337,7 +337,8 @@ int mt7615_mac_write_txwi(struct mt7615_dev *dev, __le32 *txwi, ...@@ -337,7 +337,8 @@ int mt7615_mac_write_txwi(struct mt7615_dev *dev, __le32 *txwi,
fc_stype = (le16_to_cpu(fc) & IEEE80211_FCTL_STYPE) >> 4; fc_stype = (le16_to_cpu(fc) & IEEE80211_FCTL_STYPE) >> 4;
if (ieee80211_is_data(fc) || ieee80211_is_bufferable_mmpdu(fc)) { if (ieee80211_is_data(fc) || ieee80211_is_bufferable_mmpdu(fc)) {
q_idx = skb_get_queue_mapping(skb) + wmm_idx * MT7615_MAX_WMM_SETS; q_idx = wmm_idx * MT7615_MAX_WMM_SETS +
skb_get_queue_mapping(skb);
p_fmt = MT_TX_TYPE_CT; p_fmt = MT_TX_TYPE_CT;
} else if (ieee80211_is_beacon(fc)) { } else if (ieee80211_is_beacon(fc)) {
q_idx = MT_LMAC_BCN0; q_idx = MT_LMAC_BCN0;
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
#define MAXNAME 32 #define MAXNAME 32
#define DEV_ENTRY __array(char, wiphy_name, 32) #define DEV_ENTRY __array(char, wiphy_name, 32)
#define DEV_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(dev->hw->wiphy), MAXNAME) #define DEV_ASSIGN strlcpy(__entry->wiphy_name, \
wiphy_name(dev->hw->wiphy), MAXNAME)
#define DEV_PR_FMT "%s" #define DEV_PR_FMT "%s"
#define DEV_PR_ARG __entry->wiphy_name #define DEV_PR_ARG __entry->wiphy_name
......
...@@ -86,7 +86,7 @@ mt76_txq_get_qid(struct ieee80211_txq *txq) ...@@ -86,7 +86,7 @@ mt76_txq_get_qid(struct ieee80211_txq *txq)
static void static void
mt76_check_agg_ssn(struct mt76_txq *mtxq, struct sk_buff *skb) mt76_check_agg_ssn(struct mt76_txq *mtxq, struct sk_buff *skb)
{ {
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
if (!ieee80211_is_data_qos(hdr->frame_control) || if (!ieee80211_is_data_qos(hdr->frame_control) ||
!ieee80211_is_data_present(hdr->frame_control)) !ieee80211_is_data_present(hdr->frame_control))
...@@ -206,8 +206,8 @@ mt76_tx_status_skb_get(struct mt76_dev *dev, struct mt76_wcid *wcid, int pktid, ...@@ -206,8 +206,8 @@ mt76_tx_status_skb_get(struct mt76_dev *dev, struct mt76_wcid *wcid, int pktid,
if (cb->pktid == pktid) if (cb->pktid == pktid)
return skb; return skb;
if (pktid >= 0 && if (pktid >= 0 && !time_after(jiffies, cb->jiffies +
!time_after(jiffies, cb->jiffies + MT_TX_STATUS_SKB_TIMEOUT)) MT_TX_STATUS_SKB_TIMEOUT))
continue; continue;
__mt76_tx_status_skb_done(dev, skb, MT_TX_CB_TXS_FAILED | __mt76_tx_status_skb_done(dev, skb, MT_TX_CB_TXS_FAILED |
...@@ -249,7 +249,7 @@ mt76_tx(struct mt76_dev *dev, struct ieee80211_sta *sta, ...@@ -249,7 +249,7 @@ mt76_tx(struct mt76_dev *dev, struct ieee80211_sta *sta,
struct mt76_wcid *wcid, struct sk_buff *skb) struct mt76_wcid *wcid, struct sk_buff *skb)
{ {
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct mt76_queue *q; struct mt76_queue *q;
int qid = skb_get_queue_mapping(skb); int qid = skb_get_queue_mapping(skb);
...@@ -269,7 +269,7 @@ mt76_tx(struct mt76_dev *dev, struct ieee80211_sta *sta, ...@@ -269,7 +269,7 @@ mt76_tx(struct mt76_dev *dev, struct ieee80211_sta *sta,
tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK; tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
txq = sta->txq[tid]; txq = sta->txq[tid];
mtxq = (struct mt76_txq *) txq->drv_priv; mtxq = (struct mt76_txq *)txq->drv_priv;
if (mtxq->aggr) if (mtxq->aggr)
mt76_check_agg_ssn(mtxq, skb); mt76_check_agg_ssn(mtxq, skb);
...@@ -317,7 +317,7 @@ static void ...@@ -317,7 +317,7 @@ static void
mt76_queue_ps_skb(struct mt76_dev *dev, struct ieee80211_sta *sta, mt76_queue_ps_skb(struct mt76_dev *dev, struct ieee80211_sta *sta,
struct sk_buff *skb, bool last) struct sk_buff *skb, bool last)
{ {
struct mt76_wcid *wcid = (struct mt76_wcid *) sta->drv_priv; struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
info->control.flags |= IEEE80211_TX_CTRL_PS_RESPONSE; info->control.flags |= IEEE80211_TX_CTRL_PS_RESPONSE;
...@@ -343,7 +343,7 @@ mt76_release_buffered_frames(struct ieee80211_hw *hw, struct ieee80211_sta *sta, ...@@ -343,7 +343,7 @@ mt76_release_buffered_frames(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
spin_lock_bh(&hwq->lock); spin_lock_bh(&hwq->lock);
for (i = 0; tids && nframes; i++, tids >>= 1) { for (i = 0; tids && nframes; i++, tids >>= 1) {
struct ieee80211_txq *txq = sta->txq[i]; struct ieee80211_txq *txq = sta->txq[i];
struct mt76_txq *mtxq = (struct mt76_txq *) txq->drv_priv; struct mt76_txq *mtxq = (struct mt76_txq *)txq->drv_priv;
struct sk_buff *skb; struct sk_buff *skb;
if (!(tids & 1)) if (!(tids & 1))
...@@ -606,7 +606,7 @@ void mt76_txq_remove(struct mt76_dev *dev, struct ieee80211_txq *txq) ...@@ -606,7 +606,7 @@ void mt76_txq_remove(struct mt76_dev *dev, struct ieee80211_txq *txq)
if (!txq) if (!txq)
return; return;
mtxq = (struct mt76_txq *) txq->drv_priv; mtxq = (struct mt76_txq *)txq->drv_priv;
while ((skb = skb_dequeue(&mtxq->retry_q)) != NULL) while ((skb = skb_dequeue(&mtxq->retry_q)) != NULL)
ieee80211_free_txskb(dev->hw, skb); ieee80211_free_txskb(dev->hw, skb);
...@@ -615,7 +615,7 @@ EXPORT_SYMBOL_GPL(mt76_txq_remove); ...@@ -615,7 +615,7 @@ EXPORT_SYMBOL_GPL(mt76_txq_remove);
void mt76_txq_init(struct mt76_dev *dev, struct ieee80211_txq *txq) void mt76_txq_init(struct mt76_dev *dev, struct ieee80211_txq *txq)
{ {
struct mt76_txq *mtxq = (struct mt76_txq *) txq->drv_priv; struct mt76_txq *mtxq = (struct mt76_txq *)txq->drv_priv;
skb_queue_head_init(&mtxq->retry_q); skb_queue_head_init(&mtxq->retry_q);
......
...@@ -154,7 +154,7 @@ static void mt76u_copy(struct mt76_dev *dev, u32 offset, ...@@ -154,7 +154,7 @@ static void mt76u_copy(struct mt76_dev *dev, u32 offset,
mutex_lock(&usb->usb_ctrl_mtx); mutex_lock(&usb->usb_ctrl_mtx);
for (i = 0; i < DIV_ROUND_UP(len, 4); i++) { for (i = 0; i < DIV_ROUND_UP(len, 4); i++) {
put_unaligned(val[i], (u32 *) usb->data); put_unaligned(val[i], (u32 *)usb->data);
ret = __mt76u_vendor_request(dev, MT_VEND_MULTI_WRITE, ret = __mt76u_vendor_request(dev, MT_VEND_MULTI_WRITE,
USB_DIR_OUT | USB_TYPE_VENDOR, USB_DIR_OUT | USB_TYPE_VENDOR,
0, offset + i * 4, usb->data, 0, offset + i * 4, usb->data,
...@@ -309,14 +309,13 @@ mt76u_refill_rx(struct mt76_dev *dev, struct urb *urb, int nsgs, gfp_t gfp) ...@@ -309,14 +309,13 @@ mt76u_refill_rx(struct mt76_dev *dev, struct urb *urb, int nsgs, gfp_t gfp)
{ {
struct mt76_queue *q = &dev->q_rx[MT_RXQ_MAIN]; struct mt76_queue *q = &dev->q_rx[MT_RXQ_MAIN];
if (dev->usb.sg_en) { if (dev->usb.sg_en)
return mt76u_fill_rx_sg(dev, q, urb, nsgs, gfp); return mt76u_fill_rx_sg(dev, q, urb, nsgs, gfp);
} else {
urb->transfer_buffer_length = q->buf_size; urb->transfer_buffer_length = q->buf_size;
urb->transfer_buffer = page_frag_alloc(&q->rx_page, urb->transfer_buffer = page_frag_alloc(&q->rx_page, q->buf_size, gfp);
q->buf_size, gfp);
return urb->transfer_buffer ? 0 : -ENOMEM; return urb->transfer_buffer ? 0 : -ENOMEM;
}
} }
static int static int
...@@ -752,13 +751,14 @@ mt76u_tx_setup_buffers(struct mt76_dev *dev, struct sk_buff *skb, ...@@ -752,13 +751,14 @@ mt76u_tx_setup_buffers(struct mt76_dev *dev, struct sk_buff *skb,
if (!dev->usb.sg_en) { if (!dev->usb.sg_en) {
urb->transfer_buffer = skb->data; urb->transfer_buffer = skb->data;
return 0; return 0;
} else { }
sg_init_table(urb->sg, MT_TX_SG_MAX_SIZE); sg_init_table(urb->sg, MT_TX_SG_MAX_SIZE);
urb->num_sgs = skb_to_sgvec(skb, urb->sg, 0, skb->len); urb->num_sgs = skb_to_sgvec(skb, urb->sg, 0, skb->len);
if (urb->num_sgs == 0) if (!urb->num_sgs)
return -ENOMEM; return -ENOMEM;
return urb->num_sgs; return urb->num_sgs;
}
} }
static int static int
...@@ -874,7 +874,8 @@ void mt76u_stop_tx(struct mt76_dev *dev) ...@@ -874,7 +874,8 @@ void mt76u_stop_tx(struct mt76_dev *dev)
struct mt76_queue *q; struct mt76_queue *q;
int i, j, ret; int i, j, ret;
ret = wait_event_timeout(dev->tx_wait, !mt76_has_tx_pending(dev), HZ/5); ret = wait_event_timeout(dev->tx_wait, !mt76_has_tx_pending(dev),
HZ / 5);
if (!ret) { if (!ret) {
dev_err(dev->dev, "timed out waiting for pending tx\n"); dev_err(dev->dev, "timed out waiting for pending tx\n");
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
#define MAXNAME 32 #define MAXNAME 32
#define DEV_ENTRY __array(char, wiphy_name, 32) #define DEV_ENTRY __array(char, wiphy_name, 32)
#define DEV_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(dev->hw->wiphy), MAXNAME) #define DEV_ASSIGN strlcpy(__entry->wiphy_name, \
wiphy_name(dev->hw->wiphy), MAXNAME)
#define DEV_PR_FMT "%s " #define DEV_PR_FMT "%s "
#define DEV_PR_ARG __entry->wiphy_name #define DEV_PR_ARG __entry->wiphy_name
...@@ -54,7 +55,7 @@ DECLARE_EVENT_CLASS(urb_transfer, ...@@ -54,7 +55,7 @@ DECLARE_EVENT_CLASS(urb_transfer,
TP_PROTO(struct mt76_dev *dev, struct urb *u), TP_PROTO(struct mt76_dev *dev, struct urb *u),
TP_ARGS(dev, u), TP_ARGS(dev, u),
TP_STRUCT__entry( TP_STRUCT__entry(
DEV_ENTRY __field(unsigned, pipe) __field(u32, len) DEV_ENTRY __field(unsigned int, pipe) __field(u32, len)
), ),
TP_fast_assign( TP_fast_assign(
DEV_ASSIGN; DEV_ASSIGN;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/bitfield.h> #include <linux/bitfield.h>
#define MT76_INCR(_var, _size) \ #define MT76_INCR(_var, _size) \
_var = (((_var) + 1) % _size) (_var = (((_var) + 1) % (_size)))
int mt76_wcid_alloc(unsigned long *mask, int size); int mt76_wcid_alloc(unsigned long *mask, int size);
...@@ -25,7 +25,7 @@ mt76_wcid_free(unsigned long *mask, int idx) ...@@ -25,7 +25,7 @@ mt76_wcid_free(unsigned long *mask, int idx)
static inline void static inline void
mt76_skb_set_moredata(struct sk_buff *skb, bool enable) mt76_skb_set_moredata(struct sk_buff *skb, bool enable)
{ {
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
if (enable) if (enable)
hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA); hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment