aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorGary S. Robertson <gary.robertson@linaro.org>2015-10-21 01:59:12 -0500
committerGary S. Robertson <gary.robertson@linaro.org>2015-10-21 01:59:12 -0500
commit8797b9d0f050f5d5c5b6ccb9b3c993bc02d6937b (patch)
treec6305b31b18ca2f49c1e1b88fec9c920be0252f2 /net
parent48ffd0d5e7b2fb6e7d47344320dbeeaf15d6fd5a (diff)
parenta143f427f3e7c6d80bc1d288334706a1f8237f5f (diff)
Merge tag 'lsk-v4.1-15.09-rt' of http://git.linaro.org/kernel/linux-linaro-stable into linux-linaro-lng-v4.1-rtlinux-lng-preempt-rt-4.1.7-2015.12linux-lng-preempt-rt-4.1.7-2015.11linux-lng-preempt-rt-4.1.7-2015.10
LSK RT 15.09 v4.1 Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Conflicts: linaro/configs/distribution.conf
Diffstat (limited to 'net')
-rw-r--r--net/9p/client.c2
-rw-r--r--net/bluetooth/smp.c4
-rw-r--r--net/mac80211/rc80211_minstrel.c11
3 files changed, 12 insertions, 5 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 81925b923318..fcf6fe063d82 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1541,6 +1541,7 @@ p9_client_read(struct p9_fid *fid, u64 offset, struct iov_iter *to, int *err)
struct p9_client *clnt = fid->clnt;
struct p9_req_t *req;
int total = 0;
+ *err = 0;
p9_debug(P9_DEBUG_9P, ">>> TREAD fid %d offset %llu %d\n",
fid->fid, (unsigned long long) offset, (int)iov_iter_count(to));
@@ -1616,6 +1617,7 @@ p9_client_write(struct p9_fid *fid, u64 offset, struct iov_iter *from, int *err)
struct p9_client *clnt = fid->clnt;
struct p9_req_t *req;
int total = 0;
+ *err = 0;
p9_debug(P9_DEBUG_9P, ">>> TWRITE fid %d offset %llu count %zd\n",
fid->fid, (unsigned long long) offset,
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 1ab3dc9c8f99..7b815bcc8c9b 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -2295,6 +2295,10 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)
return 1;
chan = conn->smp;
+ if (!chan) {
+ BT_ERR("SMP security requested but not available");
+ return 1;
+ }
if (!hci_dev_test_flag(hcon->hdev, HCI_LE_ENABLED))
return 1;
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 247552a7f6c2..3ece7d1034c8 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -92,14 +92,15 @@ int minstrel_get_tp_avg(struct minstrel_rate *mr, int prob_ewma)
static inline void
minstrel_sort_best_tp_rates(struct minstrel_sta_info *mi, int i, u8 *tp_list)
{
- int j = MAX_THR_RATES;
- struct minstrel_rate_stats *tmp_mrs = &mi->r[j - 1].stats;
+ int j;
+ struct minstrel_rate_stats *tmp_mrs;
struct minstrel_rate_stats *cur_mrs = &mi->r[i].stats;
- while (j > 0 && (minstrel_get_tp_avg(&mi->r[i], cur_mrs->prob_ewma) >
- minstrel_get_tp_avg(&mi->r[tp_list[j - 1]], tmp_mrs->prob_ewma))) {
- j--;
+ for (j = MAX_THR_RATES; j > 0; --j) {
tmp_mrs = &mi->r[tp_list[j - 1]].stats;
+ if (minstrel_get_tp_avg(&mi->r[i], cur_mrs->prob_ewma) <=
+ minstrel_get_tp_avg(&mi->r[tp_list[j - 1]], tmp_mrs->prob_ewma))
+ break;
}
if (j < MAX_THR_RATES - 1)