aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-18 04:15:26 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-07-18 05:11:38 -0400
commitbeb19e4c079d626bf0502fbb65bd7c9891a10c2e (patch)
treee53da4ddea4887a8994aade8c415c6b3f976f8c8 /net
parent2f407f0afb443207789df3fb46456551aea11cc3 (diff)
Bluetooth: Use EOPNOTSUPP instead of ENOTSUPP
The EOPNOTSUPP and ENOTSUPP errors are very similar in meaning, but ENOTSUPP is a fairly new addition to POSIX. Not all libc versions know about the value the kernel uses for ENOTSUPP so it's better to use EOPNOTSUPP to ensure understandable error messages. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_conn.c2
-rw-r--r--net/bluetooth/l2cap_core.c2
-rw-r--r--net/bluetooth/l2cap_sock.c2
-rw-r--r--net/bluetooth/smp.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 0d76054efd26..1ac9f7f52acd 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -834,7 +834,7 @@ struct hci_conn *hci_connect_acl(struct hci_dev *hdev, bdaddr_t *dst,
834 struct hci_conn *acl; 834 struct hci_conn *acl;
835 835
836 if (!test_bit(HCI_BREDR_ENABLED, &hdev->dev_flags)) 836 if (!test_bit(HCI_BREDR_ENABLED, &hdev->dev_flags))
837 return ERR_PTR(-ENOTSUPP); 837 return ERR_PTR(-EOPNOTSUPP);
838 838
839 acl = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst); 839 acl = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst);
840 if (!acl) { 840 if (!acl) {
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index c8c259f21d80..f3fb61c9f96f 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -7094,7 +7094,7 @@ int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid,
7094 break; 7094 break;
7095 /* fall through */ 7095 /* fall through */
7096 default: 7096 default:
7097 err = -ENOTSUPP; 7097 err = -EOPNOTSUPP;
7098 goto done; 7098 goto done;
7099 } 7099 }
7100 7100
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 3bb1cdf34f07..1884f72083c2 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -279,7 +279,7 @@ static int l2cap_sock_listen(struct socket *sock, int backlog)
279 break; 279 break;
280 /* fall through */ 280 /* fall through */
281 default: 281 default:
282 err = -ENOTSUPP; 282 err = -EOPNOTSUPP;
283 goto done; 283 goto done;
284 } 284 }
285 285
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 74a0308e39f3..e49c83d8b957 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -1189,7 +1189,7 @@ int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb)
1189 } 1189 }
1190 1190
1191 if (!test_bit(HCI_LE_ENABLED, &hcon->hdev->dev_flags)) { 1191 if (!test_bit(HCI_LE_ENABLED, &hcon->hdev->dev_flags)) {
1192 err = -ENOTSUPP; 1192 err = -EOPNOTSUPP;
1193 reason = SMP_PAIRING_NOTSUPP; 1193 reason = SMP_PAIRING_NOTSUPP;
1194 goto done; 1194 goto done;
1195 } 1195 }
@@ -1207,7 +1207,7 @@ int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb)
1207 !conn->smp_chan) { 1207 !conn->smp_chan) {
1208 BT_ERR("Unexpected SMP command 0x%02x. Disconnecting.", code); 1208 BT_ERR("Unexpected SMP command 0x%02x. Disconnecting.", code);
1209 kfree_skb(skb); 1209 kfree_skb(skb);
1210 return -ENOTSUPP; 1210 return -EOPNOTSUPP;
1211 } 1211 }
1212 1212
1213 switch (code) { 1213 switch (code) {