Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d15b8459 authored by Joe Perches's avatar Joe Perches Committed by John W. Linville
Browse files

mac80211: Remove unnecessary OOM logging messages



Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 239289e4
Loading
Loading
Loading
Loading
+2 −17
Original line number Original line Diff line number Diff line
@@ -167,12 +167,8 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d
	u16 capab;
	u16 capab;


	skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
	skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);

	if (!skb)
	if (!skb) {
		printk(KERN_DEBUG "%s: failed to allocate buffer "
		       "for addba resp frame\n", sdata->name);
		return;
		return;
	}


	skb_reserve(skb, local->hw.extra_tx_headroom);
	skb_reserve(skb, local->hw.extra_tx_headroom);
	mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
	mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
@@ -279,14 +275,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,


	/* prepare A-MPDU MLME for Rx aggregation */
	/* prepare A-MPDU MLME for Rx aggregation */
	tid_agg_rx = kmalloc(sizeof(struct tid_ampdu_rx), GFP_KERNEL);
	tid_agg_rx = kmalloc(sizeof(struct tid_ampdu_rx), GFP_KERNEL);
	if (!tid_agg_rx) {
	if (!tid_agg_rx)
#ifdef CONFIG_MAC80211_HT_DEBUG
		if (net_ratelimit())
			printk(KERN_ERR "allocate rx mlme to tid %d failed\n",
					tid);
#endif
		goto end;
		goto end;
	}


	spin_lock_init(&tid_agg_rx->reorder_lock);
	spin_lock_init(&tid_agg_rx->reorder_lock);


@@ -306,11 +296,6 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
	tid_agg_rx->reorder_time =
	tid_agg_rx->reorder_time =
		kcalloc(buf_size, sizeof(unsigned long), GFP_KERNEL);
		kcalloc(buf_size, sizeof(unsigned long), GFP_KERNEL);
	if (!tid_agg_rx->reorder_buf || !tid_agg_rx->reorder_time) {
	if (!tid_agg_rx->reorder_buf || !tid_agg_rx->reorder_time) {
#ifdef CONFIG_MAC80211_HT_DEBUG
		if (net_ratelimit())
			printk(KERN_ERR "can not allocate reordering buffer "
			       "to tid %d\n", tid);
#endif
		kfree(tid_agg_rx->reorder_buf);
		kfree(tid_agg_rx->reorder_buf);
		kfree(tid_agg_rx->reorder_time);
		kfree(tid_agg_rx->reorder_time);
		kfree(tid_agg_rx);
		kfree(tid_agg_rx);
+8 −27
Original line number Original line Diff line number Diff line
@@ -68,11 +68,9 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,


	skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
	skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);


	if (!skb) {
	if (!skb)
		printk(KERN_ERR "%s: failed to allocate buffer "
				"for addba request frame\n", sdata->name);
		return;
		return;
	}

	skb_reserve(skb, local->hw.extra_tx_headroom);
	skb_reserve(skb, local->hw.extra_tx_headroom);
	mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
	mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
	memset(mgmt, 0, 24);
	memset(mgmt, 0, 24);
@@ -114,11 +112,9 @@ void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u1
	u16 bar_control = 0;
	u16 bar_control = 0;


	skb = dev_alloc_skb(sizeof(*bar) + local->hw.extra_tx_headroom);
	skb = dev_alloc_skb(sizeof(*bar) + local->hw.extra_tx_headroom);
	if (!skb) {
	if (!skb)
		printk(KERN_ERR "%s: failed to allocate buffer for "
			"bar frame\n", sdata->name);
		return;
		return;
	}

	skb_reserve(skb, local->hw.extra_tx_headroom);
	skb_reserve(skb, local->hw.extra_tx_headroom);
	bar = (struct ieee80211_bar *)skb_put(skb, sizeof(*bar));
	bar = (struct ieee80211_bar *)skb_put(skb, sizeof(*bar));
	memset(bar, 0, sizeof(*bar));
	memset(bar, 0, sizeof(*bar));
@@ -413,11 +409,6 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
	/* prepare A-MPDU MLME for Tx aggregation */
	/* prepare A-MPDU MLME for Tx aggregation */
	tid_tx = kzalloc(sizeof(struct tid_ampdu_tx), GFP_ATOMIC);
	tid_tx = kzalloc(sizeof(struct tid_ampdu_tx), GFP_ATOMIC);
	if (!tid_tx) {
	if (!tid_tx) {
#ifdef CONFIG_MAC80211_HT_DEBUG
		if (net_ratelimit())
			printk(KERN_ERR "allocate tx mlme to tid %d failed\n",
					tid);
#endif
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto err_unlock_sta;
		goto err_unlock_sta;
	}
	}
@@ -574,14 +565,9 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
	struct ieee80211_ra_tid *ra_tid;
	struct ieee80211_ra_tid *ra_tid;
	struct sk_buff *skb = dev_alloc_skb(0);
	struct sk_buff *skb = dev_alloc_skb(0);


	if (unlikely(!skb)) {
	if (unlikely(!skb))
#ifdef CONFIG_MAC80211_HT_DEBUG
		if (net_ratelimit())
			printk(KERN_WARNING "%s: Not enough memory, "
			       "dropping start BA session", sdata->name);
#endif
		return;
		return;
	}

	ra_tid = (struct ieee80211_ra_tid *) &skb->cb;
	ra_tid = (struct ieee80211_ra_tid *) &skb->cb;
	memcpy(&ra_tid->ra, ra, ETH_ALEN);
	memcpy(&ra_tid->ra, ra, ETH_ALEN);
	ra_tid->tid = tid;
	ra_tid->tid = tid;
@@ -727,14 +713,9 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
	struct ieee80211_ra_tid *ra_tid;
	struct ieee80211_ra_tid *ra_tid;
	struct sk_buff *skb = dev_alloc_skb(0);
	struct sk_buff *skb = dev_alloc_skb(0);


	if (unlikely(!skb)) {
	if (unlikely(!skb))
#ifdef CONFIG_MAC80211_HT_DEBUG
		if (net_ratelimit())
			printk(KERN_WARNING "%s: Not enough memory, "
			       "dropping stop BA session", sdata->name);
#endif
		return;
		return;
	}

	ra_tid = (struct ieee80211_ra_tid *) &skb->cb;
	ra_tid = (struct ieee80211_ra_tid *) &skb->cb;
	memcpy(&ra_tid->ra, ra, ETH_ALEN);
	memcpy(&ra_tid->ra, ra, ETH_ALEN);
	ra_tid->tid = tid;
	ra_tid->tid = tid;
+3 −0
Original line number Original line Diff line number Diff line
@@ -297,6 +297,9 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf,
	char *buf = kzalloc(mxln, GFP_KERNEL);
	char *buf = kzalloc(mxln, GFP_KERNEL);
	int sf = 0; /* how many written so far */
	int sf = 0; /* how many written so far */


	if (!buf)
		return 0;

	sf += snprintf(buf, mxln - sf, "0x%x\n", local->hw.flags);
	sf += snprintf(buf, mxln - sf, "0x%x\n", local->hw.flags);
	if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
	if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
		sf += snprintf(buf + sf, mxln - sf, "HAS_RATE_CONTROL\n");
		sf += snprintf(buf + sf, mxln - sf, "HAS_RATE_CONTROL\n");
+1 −5
Original line number Original line Diff line number Diff line
@@ -186,12 +186,8 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
	u16 params;
	u16 params;


	skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
	skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);

	if (!skb)
	if (!skb) {
		printk(KERN_ERR "%s: failed to allocate buffer "
					"for delba frame\n", sdata->name);
		return;
		return;
	}


	skb_reserve(skb, local->hw.extra_tx_headroom);
	skb_reserve(skb, local->hw.extra_tx_headroom);
	mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
	mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
+2 −3
Original line number Original line Diff line number Diff line
@@ -200,10 +200,9 @@ int mesh_rmc_check(u8 *sa, struct ieee80211s_hdr *mesh_hdr,
	}
	}


	p = kmem_cache_alloc(rm_cache, GFP_ATOMIC);
	p = kmem_cache_alloc(rm_cache, GFP_ATOMIC);
	if (!p) {
	if (!p)
		printk(KERN_DEBUG "o11s: could not allocate RMC entry\n");
		return 0;
		return 0;
	}

	p->seqnum = seqnum;
	p->seqnum = seqnum;
	p->exp_time = jiffies + RMC_TIMEOUT;
	p->exp_time = jiffies + RMC_TIMEOUT;
	memcpy(p->sa, sa, ETH_ALEN);
	memcpy(p->sa, sa, ETH_ALEN);
Loading