10000 Merge tag 'mac80211-for-davem-2016-06-29-v2' of git://git.kernel.org/… · bsd-unix/linux@751ad81 · GitHub
[go: up one dir, main page]

Skip to content

Commit 751ad81

Browse files
committed
Merge tag 'mac80211-for-davem-2016-06-29-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says: ==================== Just two small fixes * fix mesh peer link counter, decrement wasn't always done 10000 at all * fix ethertype (length) for packets without RFC 1042 or bridge tunnel header ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents d913d3a + c041778 commit 751ad81

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

net/mac80211/mesh.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,17 @@ u32 mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata)
148148
void mesh_sta_cleanup(struct sta_info *sta)
149149
{
150150
struct ieee80211_sub_if_data *sdata = sta->sdata;
151-
u32 changed;
151+
u32 changed = 0;
152152

153153
/*
154154
* maybe userspace handles peer allocation and peering, but in either
155155
* case the beacon is still generated by the kernel and we might need
156156
* an update.
157157
*/
158-
changed = mesh_accept_plinks_update(sdata);
158+
if (sdata->u.mesh.user_mpm &&
159+
sta->mesh->plink_state == NL80211_PLINK_ESTAB)
160+
changed |= mesh_plink_dec_estab_count(sdata);
161+
changed |= mesh_accept_plinks_update(sdata);
159162
if (!sdata->u.mesh.user_mpm) {
160163
changed |= mesh_plink_deactivate(sta);
161164
del_timer_sync(&sta->mesh->plink_timer);

net/wireless/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ static int __ieee80211_data_to_8023(struct sk_buff *skb, struct ethhdr *ehdr,
509509
* replace EtherType */
510510
hdrlen += ETH_ALEN + 2;
511511
else
512-
tmp.h_proto = htons(skb->len);
512+
tmp.h_proto = htons(skb->len - hdrlen);
513513

514514
pskb_pull(skb, hdrlen);
515515

0 commit comments

Comments
 (0)
0