Skip to content

Commit

Permalink
Merge pull request #210 from Mixaill/vanilla-kernel
Browse files Browse the repository at this point in the history
Add support for vanilla Linux kernel 6.2
  • Loading branch information
tgxn authored Oct 22, 2023
2 parents 7717b70 + 6b61c96 commit 1fce92b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
8 changes: 7 additions & 1 deletion rpc/open_xdatachannel.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@

cfg, unknown = parser.parse_known_args()

r = rpc.XMMRPC()
r = None
try:
r = rpc.XMMRPC()
except Exception as ex:
logging.error(ex)
exit()

ipr = IPRoute()

r.execute('UtaMsSmsInit')
Expand Down
12 changes: 10 additions & 2 deletions rpc/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@ def asn_int4(val):


class XMMRPC(object):
def __init__(self, path='/dev/xmm0/rpc'):
self.fp = os.open(path, os.O_RDWR | os.O_SYNC)
def __init__(self, interfaces=['/dev/xmm0/rpc', '/dev/wwan0xmmrpc0']):
selected_interface = None
for interface in interfaces:
if os.path.exists(interface):
selected_interface = interface
break
if selected_interface is None:
raise IOError('XMM RPC interface does not exists')

self.fp = os.open(selected_interface, os.O_RDWR | os.O_SYNC)

# loop over 1..255, excluding 0
self.tid_gen = itertools.cycle(range(1, 256))
Expand Down

0 comments on commit 1fce92b

Please sign in to comment.